-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Description
Hi!
I just discovered the following strange behaviour when converting simple units:
julia> convert(typeof(1.0u"N"), 1e-3u"mN")
1.0e-6 N
julia> 1.0e-6u"N" == convert(typeof(1.0u"N"), 1e-3u"mN")
true
julia> convert(typeof(1.0u"N"), 1e-4u"mN")
1.0000000000000001e-7 N
julia> 1.0e-7u"N" == convert(typeof(1.0u"N"), 1e-4u"mN")
false
julia> convert(typeof(1.0u"N"), 1e-5u"mN")
1.0e-8 N
julia> 1.0e-8u"N" == convert(typeof(1.0u"N"), 1e-5u"mN")
true
I tested all other exponents with absolute value less or equal than 20, and the inexact conversion happens also for exponents -8, -9, -13, -17, and -18.
Metadata
Metadata
Assignees
Labels
No labels