-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When I'm trying to use ArbFloat to replace BigFloat...
julia> x = Float32(0.00024868647)
0.00024868647f0
julia> acos(x)
1.5705476f0
julia> acos(BigFloat(x)) |> Float32
1.5705477f0
julia> acos(ArbFloat(x)) |> Float32
1.5705476f0But y=acos(x) is closed to hi=1.5705477f0
julia> x
0.00024868647f0
julia> y = acos(ArbFloat(x))
1.570547640323638925989674629263948326250377240078317
julia> lo, hi = ArbFloat(1.5705476f0), ArbFloat(1.5705477f0)
(1.570547580718994140625, 1.57054769992828369140625)
julia> (lo==Float32(y), hi==Float32(y))
(true, false)
julia> abs(lo-y) > abs(y-hi)
trueAnother example:
julia> x = 1.5893255f-8
1.5893255f-8
julia> acos(x)
1.5707963f0
julia> acos(BigFloat(x)) |> Float32
1.5707964f0
julia> acos(ArbFloat(x)) |> Float32
1.5707963f0Metadata
Metadata
Assignees
Labels
No labels