Changeset 13769


Ignore:
Timestamp:
Jun 1, 2010, 9:34:15 PM (9 years ago)
Author:
rme
Message:

In EXPT, try to avoid loss of precision by promoting the type of the
base to a double-float when the exponent is a DOUBLE-FLOAT or (COMPLEX
DOUBLE-FLOAT).

Fixes ticket:679.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-float.lisp

    r13067 r13769  
    840840           (%single-float-expt (%short-float b) (%short-float e))
    841841           ))
     842        ((typep (realpart e) 'double-float)
     843         ;; Avoid intermediate single-float result from LOG
     844         (let ((promoted-base (* 1d0 b)))
     845           (exp (* e (log promoted-base)))))
    842846        (t (exp (* e (log b))))))
    843847
Note: See TracChangeset for help on using the changeset viewer.