Skip to content

Commit 6aaa42a

Browse files
committed
more simplification
1 parent bf63b27 commit 6aaa42a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Double.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ Promote a `Double16` to a `Double32` by converting the `hi` and `lo` attributes
200200
of `x` to `Double32`s and adding in extended precision.
201201
"""
202202
Double32(x::Double16) = isfinite(x) ? Double32(two_sum(Float32(HI(x)), Float32(LO(x)))) : Double32(Float32(x))
203-
Double32(x::Double64) = isfinite(x) ? Double32(BigFloat(x)) : Double32(Float32(x))
204-
Double16(x::Double64) = isfinite(x) ? Double16(BigFloat(x)) : Double16(Float16(x))
205-
Double16(x::Double32) = isfinite(x) ? Double16(Float64(HI(x))+LO(x)) : Double16(Float16(x))
203+
Double32(x::Double64) = Double32(HI(x))
204+
Double16(x::Double64) = Double16(HI(x))
205+
Double16(x::Double32) = Double16(HI(x))
206206

207207
# cleanup to support other pkgs
208208
DoubleFloat(x::Float64) = Double64(x, 0.0)

0 commit comments

Comments
 (0)