You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I may have found a bug somewhere in the defs of == and <. If the underlying number types on LHS and RHS differ, then == and < don't behave consistently.
The first comparison is correct, as 0.1::Float64 === 0.1000000000000000055511151231257827021181583404541015625. Obviously, at least one of the other two inequalities is wrong.
The problem seems to be that < promotes to Float64, but == doesn't, so < will conclude the two values are equal, wheres == will conclude that they're not.
julia>@code_lowered==( (1//10)s, 0.1s )
julia>@code_lowered Unitful._lt( (1//10)s, 0.1s )
The text was updated successfully, but these errors were encountered:
I think I may have found a bug somewhere in the defs of
==
and<
. If the underlying number types on LHS and RHS differ, then==
and<
don't behave consistently.Example:
The first comparison is correct, as
0.1::Float64 === 0.1000000000000000055511151231257827021181583404541015625
. Obviously, at least one of the other two inequalities is wrong.The problem seems to be that
<
promotes toFloat64
, but==
doesn't, so<
will conclude the two values are equal, wheres==
will conclude that they're not.The text was updated successfully, but these errors were encountered: