Type-derivation for log is inconsistent
|Reported by:||rtoy||Owned by:||somebody|
(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.
Change History (3)
comment:1 Changed 3 years ago by toy.raymond@…
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 3 years ago by rtoy
- Resolution fixed deleted
- Status changed from closed to reopened