3 ms·
When your compiler does its internal calculations in double precision float you are right. But why should it do so? Do all languages specify the details of how
by static_noise 11y ago
When your compiler does its internal calculations in double precision float you are right.
But why should it do so? Do all languages specify the details of how floating point input is handled by the compiler/interpreter?
- tinco 11y agoI think so, yes.
- gsnedders 11y agoMost languages do (though implementation bugs are common—plenty of languages where 64-bit precision is required actually end up being implemented in such a way that 80-bit precision is used on x86). That said, a lot of low-level languages don't: C doesn't guarantee this, for example. C doesn't even mandate IEEE 754, and it merely requires that "float" is a subset of the values of "double" which is itself a subset of the values of "long double".