-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
floating-pointquantities based on floating-point numbers of different precisionquantities based on floating-point numbers of different precision
Description
On the current Julia LTS version, I'm getting this.
julia> VERSION
v"1.10.9"
(unitful) pkg> status
Status `/private/tmp/unitful/Project.toml`
[1986cc42] Unitful v1.22.0
julia> promote(π, 1f0u"°")
(3.141592653589793, 0.01745329238474369)
This is inconsistent with unitless promotion.
julia> promote(π, 1f0)
(3.1415927f0, 1.0f0)
Curiously, this bug is not there if I use the same Unitful version on the current Julia release version.
julia> VERSION
v"1.11.5"
(unitful) pkg> status
Status `/private/tmp/unitful/Project.toml`
[1986cc42] Unitful v1.22.0
julia> promote(π, 1f0u"°")
(3.1415927f0, 0.017453292f0)
I tried looking into what exactly is going wrong here, but the promotion machinery is pretty tough to wrap my head around....
Metadata
Metadata
Assignees
Labels
floating-pointquantities based on floating-point numbers of different precisionquantities based on floating-point numbers of different precision