Re:Converting binary floating-point numbers to integers
by nly on Saturday October 23, 2021 @05:36AM
(#28966977)
Unit test cases should be explicit. For determining if his algorithm is correct he could implement it 2 completely different ways and do bitwise fuzz testing to try and find cases where the output differs.
[ Parent
| on HN ]
Re:Converting binary floating-point numbers to integers
by ghoward on Saturday October 23, 2021 @04:34PM
(#28971986)
Or (if he did it with floats), tested it with all 4 billion floats. [1]
[1]: https://randomascii.wordpress.com/2014/01/27/theres-only-fou...