New answers tagged

9

The biggest problem was that on Intel CPUs with external floating point unit (80387 IIRC) all operations were done in extended precision, while Java required double precision. And due to “double rounding”, you can’t use an extended precision operation and round to double precision, in rare situations this would change the result. So this would have been a ...


11

From what I understand, unless things have changed, I think that even in non-strict mode, Java required that floating-point values be rounded to the appropriate length in the mantissa. Leeway was allowed, however, with values that were smaller the smallest normalized float value. Most float values should have 24 bits of precision, but values whose ...


33

The range of intermediate results. The Java Language Specification, 2nd Ed. relaxed the evaluation rules for floating-point expressions by introducing the notion of an ‘FP-strict’ expression, defined as follows (§15.4, p. 319): Within an FP-strict expression, all intermediate values must be elements of the float value set or the double value set, implying ...


4

I managed to dig into the code (specifically the FOUT function), and my findings are as follows: The 6502 Microsoft BASIC interpreter comes in two flavours, which I am going to call 32-bit builds and 40-bit builds; the name comes from the interpreter’s internal floating-point precision. The relevance of this for the number formatting algorithm is that the ...


Top 50 recent answers are included