File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 2
2
* .jl. * .cov
3
3
* .jl.mem
4
4
deps /deps.jl
5
+ .DS_Store
Original file line number Diff line number Diff line change 57
57
58
58
59
59
function sqrt_dd_dd (x:: Tuple{T,T} ) where {T<: IEEEFloat }
60
- (isnan (HI (x)) | iszero (HI (x))) && return x
61
- signbit (HI (x)) && throw (DomainError (" sqrt(x) expects x >= 0" ))
60
+ hi, lo = x
61
+ (isnan (hi) | iszero (hi)) && return x
62
+ signbit (hi) && throw (DomainError (" sqrt(x) expects x >= 0" ))
63
+ issubnormal (hi) && return DoubleFloat {T} (sqrt (hi), zero (T))
62
64
63
65
half = T (0.5 )
64
66
dhalf = (half, zero (T))
65
67
66
- r = inv (sqrt (HI (x) ))
67
- h = (HI (x) * half, LO (x) * half)
68
+ r = inv (sqrt (hi ))
69
+ h = (hi * half, lo * half)
68
70
69
71
r2 = mul_fpfp_dd (r, r)
70
72
hr2 = mul_dddd_dd (h, r2)
@@ -98,7 +100,7 @@ invcuberootsquared(A) is found iteratively using Newton's method with a final ap
98
100
=#
99
101
100
102
function cbrt_dd_dd (a:: Tuple{T,T} ) where {T<: IEEEFloat }
101
- hi, lo = HILO (a )
103
+ issubnormal ( HI (a)) && return DoubleFloat {T} ( cbrt ( HI (a)), zero (T) )
102
104
a2 = mul_dddd_dd (a,a)
103
105
one1 = one (T)
104
106
onethird = (0.3333333333333333 , 1.850371707708594e-17 )
You can’t perform that action at this time.
0 commit comments