Skip to content
  • sven.panne@aedion.de's avatar
    [project @ 2000-07-16 21:10:48 by panne] · 2869e22f
    sven.panne@aedion.de authored
    This commit tries to fix the discrepancies between the results of
    floating point calculations during runtime and compile time, see
    e.g. fptools/ghc/tests/numeric/should_run/arith008.hs. Part of the
    story was the fact that floating point values are represented as
    Rationals in GHC and therefore never lost precision, at least for the
    operations for which constant folding is done. To compensate for this,
    before and after floating point operations the operands are
    temporarily converted to/from Float/Double. This is wrong, because
    host architecture and target architecture are confused this way, but
    in a non-cross-compiling scenario it works.
    2869e22f