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
We applied our automated testing tool for testing a large number of functions in Julia Base and uncovered the below inconsistent behavior. We verified this on several versions including Julia 1.10.0-DEV.794, Julia 1.9.0-rc1, and Julia 1.8.5 and the behavior is the same for them all.
The problem seems to be that when one argument is negative and the other is an unsigned integer it will sometimes raise an exception, for UInt64 and UInt128, but other times not, for UInt8/Uint16/UInt32/BigInt. So likely with how type promotion is carried out when two arguments of different types. A corresponding inconsistency is also seen for Base.min.
I'd say the inconsistency is at least unexpected but even if not considered a bug maybe this should be noted somewhere in the documentation. Or maybe it is and I missed something? Thanks for any input/pointers.
Minimum working example (showing for 1.8.5 running on MacBook Pro 16 with M1Max but verified also for other versions, for all Julia versions I installed via dmg files from julialang.org):
We applied our automated testing tool for testing a large number of functions in Julia Base and uncovered the below inconsistent behavior. We verified this on several versions including Julia 1.10.0-DEV.794, Julia 1.9.0-rc1, and Julia 1.8.5 and the behavior is the same for them all.
The problem seems to be that when one argument is negative and the other is an unsigned integer it will sometimes raise an exception, for UInt64 and UInt128, but other times not, for UInt8/Uint16/UInt32/BigInt. So likely with how type promotion is carried out when two arguments of different types. A corresponding inconsistency is also seen for Base.min.
I'd say the inconsistency is at least unexpected but even if not considered a bug maybe this should be noted somewhere in the documentation. Or maybe it is and I missed something? Thanks for any input/pointers.
Minimum working example (showing for 1.8.5 running on MacBook Pro 16 with M1Max but verified also for other versions, for all Julia versions I installed via dmg files from julialang.org):
The text was updated successfully, but these errors were encountered: