Re: Test should pass? SunOS
- Posted by petelomax Sep 17, 2017
- 1538 views
I just wanted to suggest that perhaps a more sensible test might be:
test_true( "Avagadro #1", abs(6.022141 * power(10,23) - scientific_to_atom("6.022141e23"))<1e8 )
aside: 1e8 might look like a massive error margin, but of course it is tiny relative to 1e23 (and in fact one millionth of one millionth of 0.1%).
Pete
EDIT: I now realize it may be impossible to replicate the precise floating point rounding modes on a completely different chip.