Created
January 20, 2021 12:47
-
-
Save athas/0c1c34772f0093c0401e88f6287569b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isnan32 (x: f32) = | |
let x = f32.to_bits x | |
let exponent = (x >> 23) & 0b11111111 | |
let significand = x & 0b11111111111111111111111 | |
in exponent == 0b11111111 && significand != 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment