4 ms·
I thought this was a side effect from a GCC bug when it affected PHP. So does Java use the same algorithm for generating machine code at it's lowest level?
by adaml_623 16y ago
I thought this was a side effect from a GCC bug when it affected PHP. So does Java use the same algorithm for generating machine code at it's lowest level?
- pietrofmaggi 16y agoNo, It's a different problem, as stated in the article: "Java’s decimal to floating-point conversion routine is java code, although obviously modeled on David Gay’s C code. Apparently, it was changed just enough to avoid the x87 error — but it introduced a new error."
- JoachimSchipper 16y agoWell, a GCC "bug" - IIRC gcc used the i386 floating-point hardware, which is 80 bits wide (whereas PHP was expecting 64-bit doubles). GCC is arguably correct by preferring the wider type - people should just learn that == and floating point don't match.