On Mon, 27 Aug 2018 at 09:58:58 +1000, Tim Lunn wrote:
> 747197: TimeClip behavior for very large numbers
> non262/Date/timeclip.js:19:1 Error: Assertion failed: got true, expected false

function addToLimit(n) { return 8.64e15 + n; }
...
assertEq(8.64e15 === addToLimit(0.5000000000000001), false);

but on i386 it seems 8.64e15 + 0.5000000000000001 === 8.64e15, perhaps
due to loss of precision somewhere?

> uncaught exception: Test262Error: #1: var x = 9007199254740994.0; var y = 1.0 
> - 1/65536.0; var z = x + y; var d = z - x; d === 0. Actual: 2

x is 2^53 + 2 and the assertion is that (x + y) - x evaluates to 0 due
to loss of precision (with unlimited precision the answer would be y,
which is a bit less than 1); but on i386 it evaluates to 2, perhaps due
to excess precision (i387 80-bit floating-point)?

Maybe compiling with -ffloat-store and/or -fexcess-precision=standard
would help? firefox-esr seems to be compiled to assume SSE2, which is
itself a RC bug (#908396) but might have been used to address this.

> uncaught exception: Test262Error: #1: var x = 9007199254740994.0; var y = 1.0 
> - 1/65536.0; var z = x + y; var d = z - x; d !== 2

This is a less strict form of the above: instead of asserting that the
answer is 0, it asserts that the answer is something other than 2.

    smcv

Reply via email to