5 ms·
I wouldn't want to write the test that way because it seems very complex. The other way I'd be tempted to write it would be to compare the bit patterns and trea
by brucedawson 9y ago
I wouldn't want to write the test that way because it seems very complex. The other way I'd be tempted to write it would be to compare the bit patterns and treat mismatched bit patterns as a failure unless both numbers are NaN.
To some extent it comes down to personal taste and how much knowledge of FP you want embedded in the test.