1.0.27.41: floating point implementation smoothing
authorChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 14:41:54 +0000 (14:41 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 14:41:54 +0000 (14:41 +0000)
commit9510443d0bd00fcbd0213e07a5340e66d9ce7301
tree842b63ddec5c05de190531d2cb9a129cc4d896fd
parent8f45dd3a5a074998e1aa697ba8f2a8b1b7388427
1.0.27.41: floating point implementation smoothing

To get floating point stuff exactly right, we should build a complete
IEEE float implementation to do calculations in for the cross-compiler.
Since that's not going to happen this millennium, instead try to be
careful when writing code that looks constant-foldable.  Some other
fixups on the way...

6 messages follow:

fix load-time tests in src/code/pred

It turns out that #c(1.1 0) is not portable: it's a REAL in clisp and a
COMPLEX in sbcl.

begin work on floats

Floats Are Hard.  The issue is that the host's float implementation,
even if it agrees with SBCL that SINGLE-FLOAT is IEEE single and
DOUBLE-FLOAT is IEEE double, may not match sbcl idiosyncracy for
idiosyncracy.  For example, clisp doesn't support denormals, so its
LEAST-FOOATIVE-QUUXLE-FLOAT constants are very different from sbcl's:
and sbcl's can't even be represented within the host.  Ugh.

Defining the print-related MIN-E constants is, however, easy enough.

comment (well, #!+long-float) out some floating point constants

The clauses in question were never taken absent #!+long-float anyway.

-0.0 is not portable: many lisps don't respect negative zeros

Use make-unportable-float instead, and hope that this doesn't matter
during cross-compilation...

host floating point differences

Not all lisps think (log 2d0 10d0) is the same.  Compute it accurately
and use LOAD-TIME-VALUE.

tentative attempt at smoothing over host floating point differences

Compute all the necessary constants as double-float bit patterns using
LOAD-TIME-VALUE.
src/code/irrat.lisp
src/code/pred.lisp
src/code/print.lisp
src/compiler/srctran.lisp
src/compiler/x86/float.lisp
version.lisp-expr