logoalt Hacker News

eesmithtoday at 6:37 AM2 repliesview on HN

And as I wrote, "There's platform and there's platform."

I don't support the full range of platforms that C supports. I assume 8 bit chars. I assume good hardware support for 754. I assume the compiler's documentation is correct when it says it map "double" to "binary64" and uses native operations. I assume if someone else compiles my code with non-754 flags, like fused multiply and add, then it's not a problem I need to worry about.

For that matter, my code doesn't deal with NaNs or inf (other than input rejection tests) so I don't even need fully conformant 754.


Replies

shaknatoday at 9:38 AM

I can test for some of those. So I can support a broader range of platforms, than just "works for me".

I can't support IEEE 754, so its simply irrelevant - so long as I know I cannot support it, and behaviour differs.

fc417fc802today at 6:48 AM

So you don't test for it because your code doesn't use it. Which is fine, but says nothing about code which does depend on the relevant assumptions.