Closed
Description
While I was reviewing the PR #123, I found a minor bug.
julia> float(3N3f5) # this is ok
3.0f0
julia> float(3N4f12)
3.0000002f0
julia> float(3N8f8)
3.0000002f0
julia> float(3N10f6)
3.0000002f0
julia> float(3N12f4)
3.0000002f0
julia> float(3N13f3)
3.0000002f0
julia> float(3N2f6)
3.0000002f0
julia> float(3N4f4)
3.0000002f0
julia> float(3N5f3)
3.0000002f0
I think this is a problem with the division optimization.
FixedPointNumbers.jl/src/normed.jl
Lines 75 to 78 in da39318
The rounding errors can occur everywhere, but especially the errors at integer values are critical.
julia> isinteger(float(3N5f3))
false
Metadata
Metadata
Assignees
Labels
No labels