[cmucl] #92: Type-derivation for log is inconsistent
cmucl
cmucl-devel at common-lisp.net
Sun Feb 9 17:32:11 UTC 2014
#92: Type-derivation for log is inconsistent
--------------------+-------------------------------------------------------
Reporter: rtoy | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: Core | Version: 2014-02
Keywords: |
--------------------+-------------------------------------------------------
Consider
{{{
(defun foo (x)
(declare (type (double-float 0d0) x))
(log x))
}}}
When compiled, the compiler says the return type for {{{foo}}} is
{{{(OR DOUBLE-FLOAT (COMPLEX DOUBLE-FLOAT))}}}. This is inconsistent with
the return value of {{{(log 0d0)}}} and {{{(log -0d0)}}} which is {{{EXT
:DOUBLE-FLOAT-NEGATIVE-INFINITY}}} (when the {{{:DIVIDE-BY-ZERO}}} trap is
disabled).
The correct derived type should be just {{{DOUBLE-FLOAT}}}.
--
Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/92>
cmucl <http://common-lisp.net/project/cmucl>
Cmucl is a high-performance, free Common Lisp implementation.
More information about the cmucl-ticket
mailing list