[project @ 2000-07-16 21:10:48 by panne]
authorpanne <unknown>
Sun, 16 Jul 2000 21:10:48 +0000 (21:10 +0000)
committerpanne <unknown>
Sun, 16 Jul 2000 21:10:48 +0000 (21:10 +0000)
commit2869e22f31ff45ac4693551dcc311d5219dc8347
treeda07c4d1984f7f6297154cd8c1131d5cd151f969
parentc5684f878f4e0200243d04ee47961901ed9a7734
[project @ 2000-07-16 21:10:48 by panne]
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.
ghc/compiler/prelude/PrelRules.lhs