Changeset 32565 in project


Ignore:
Timestamp:
07/10/15 20:26:45 (5 years ago)
Author:
sjamaan
Message:

numbers: Add -fexcess-precision=standard because GCC is an asshole.

More seriously, this makes test results consistent across platforms:
otherwise on i386 (and only on Linux with GCC, it seems) the results
of converting bignums to flonums will be inconsistent with the
results on any other platform.

Funny thing: Inserting a printf to debug the issue makes it go away,
because the compiler forces the register into memory, which means it
will lose precision (as it takes up the space of a C double).

Thanks to Juergen Lorenz for reporting and verifying that this fixes
the problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers.setup

    r32330 r32565  
    11;;;; numbers.setup -*- Scheme -*-
    22
    3 (compile -s -O3 numbers.scm -j numbers)
     3;; The -fexcess-precision option is needed to avoid surprising FP
     4;; behaviour in bignum->flonum on x86, due to extended FP register
     5;; usage.  Go figure.
     6(compile -C -fexcess-precision=standard -s -O3 numbers.scm -j numbers)
    47(compile -s -O3 numbers.import.scm)
    58
Note: See TracChangeset for help on using the changeset viewer.