open intervals and type derivation
authorChristophe Rhodes <csr21@cantab.net>
Sat, 12 May 2012 12:40:24 +0000 (13:40 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sat, 12 May 2012 12:40:24 +0000 (13:40 +0100)
commite0aff99a73d836da0dad4602e5559595fbe5ba5c
tree5dca84d76dd5f75ec075b1178b479d8dcf32a041
parentd47b2f66bdb7abc9de99658e8dbdd1c7c108881e
open intervals and type derivation

When dealing with open intervals, preserving the openness of a bound in
a result depends on the operation being strictly monotonic, rather than
merely monotonic.  However, many operations which at first sight seem
strictly monotonic are in fact not, including:
- squaring (expt least-positive-double-float 2) = (expt 0d0 2)
- coercion (coerce (1+ double-float-epsilon) 'single-float)
  = (coerce 1d0 'single-float)

Modify various coercion and interval functions to include conservatism
in these situations.  (Fixes lp#997528)
NEWS
src/compiler/float-tran.lisp
src/compiler/srctran.lisp
tests/compiler.impure.lisp