Comment 2 for bug 894498

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

commit 0dda5090b6c16a641000b4eb2dcd479f39b784ca
Author: Lutz Euler <email address hidden>
Date: Wed Nov 23 20:31:09 2011 +0100

    Tighter floating-point type constraints in some cases

    CONSTRAIN-FLOAT-TYPE used to return a closed bound in some cases where
    the corresponding (tighter) open bound would have been derivable,
    leading to missed optimisation opportunities. For example the compiler
    did not derive that x is not zero in the following call to LOG:

    (defun foo (x)
      (declare (type (single-float 0.0) x))
      (when (> x 0.0)
        (log x)))

    Fix CONSTRAIN-FLOAT-TYPE so that it returns the tightest possible result
    in all cases.

    See lp#894498 for details.