From 0b146f6003b1ab8703f01c6df322b4d02b4f788d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sat, 20 May 2017 18:40:24 +0200 Subject: [PATCH] [skip ci] Make comment describing add22condh meaningful --- base/math.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/math.jl b/base/math.jl index 4d8eb64fc8d321..5a547caa88e431 100644 --- a/base/math.jl +++ b/base/math.jl @@ -716,7 +716,10 @@ end ## rem2pi-related calculations ## function add22condh(xh::Float64, xl::Float64, yh::Float64, yl::Float64) - # as above, but only compute and return high double + # This algorithm, due to Dekker, computes the sum of + # two double-double numbers and return high double. References: + # [1] http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=PPN362160546_0018&DMDID=DMDLOG_0023&LOGID=LOG_0023&PHYSID=PHYS_0232 + # [2] https://dx.doi.org/10.1007/BF01397083 r = xh+yh s = (abs(xh) > abs(yh)) ? (xh-r+yh+yl+xl) : (yh-r+xh+xl+yl) zh = r+s