Skip to content

Commit

Permalink
[skip ci] Make comment describing add22condh meaningful
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed May 20, 2017
1 parent 04a6227 commit 0b146f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b146f6

Please sign in to comment.