Re:Making Rust as Fast as Go
by fluffything on Sunday May 03, 2020 @04:21PM
(#23061569)
> Rust specifies that if one input is NaN then the other is returned but doesn’t say what happens if both are NaN.
It does. If both are NaN a NaN is returned. Note, however, that when Rust says that a NaN is returned, this means that any NaN can be returned. So if you have min(NaN0, NaN0) the result isn't necessarily NaN0, it might be another NaN with a different payload.
It does. If both are NaN a NaN is returned. Note, however, that when Rust says that a NaN is returned, this means that any NaN can be returned. So if you have min(NaN0, NaN0) the result isn't necessarily NaN0, it might be another NaN with a different payload.