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
std.math: allow comptime_floats in isInf and isNan
Currently constants passed to these functions trigger an obtuse:
`error: access of union field 'float' while field 'comptime_float' is active`
where the work-around is to cast the constant into a runtime float.
From ziglang#21205, I'm leveraging the fact
that `comptime_float` won't (eventually) support NaN or infinity, so the
`isNan` and `isInf` methods can unilaterally return false for
`comptime_float` parameters.
Add tests for comptime floats passed to isNan, isInf*.
See ziglang#23258 for the motivation.
Fixesziglang#22107
0 commit comments