#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.
#93: 4d-324 signals a reader error but shouldn't?
--------------------+-------------------------------------------------------
Reporter: rtoy | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: Core | Version: 2014-02
Keywords: |
--------------------+-------------------------------------------------------
At the repl, 4d-324 throws a reader error. But the nearest float to
4d-324 is {{{least-positive-double-float}}} so we should probably return
that instead of throwing an error.
But values less than {{{0.5 * least-positive-double-float}}} could be
rounded to 0, but I think the reader error is still appropriate. CLHS
2.3.1.1 says exponents that are out of range should signal a reader error.
--
Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/93>
cmucl <http://common-lisp.net/project/cmucl>
Cmucl is a high-performance, free Common Lisp implementation.
#91: ppc fails tan.exceptions test
--------------------+-------------------------------------------------------
Reporter: rtoy | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: Core | Version: 2014-01
Keywords: |
--------------------+-------------------------------------------------------
The test {{{(tan ext:double-float-positive-infinity)}}} correctly
generates an invalid operation, but the test code doesn't catch it for
some reason.
--
Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/91>
cmucl <http://common-lisp.net/project/cmucl>
Cmucl is a high-performance, free Common Lisp implementation.