EXPT with single-float base and integral power can't be optimized

Bug #1908830 reported by Michael Fiano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(declaim (ftype (function (single-float) single-float) quartic-in))
(declaim (inline quartic-in))
(defun quartic-in (x)
  (declare (optimize speed))
  (expt x 4))

; file: /tmp/slimeDWLQ8A
; in: DEFUN QUARTIC-IN
; (EXPT NET.MFIANO.LISP.ORIGIN::X 4)
;
; note: unable to
; optimize
; due to type uncertainty:
; The first argument is a SINGLE-FLOAT, not a (SINGLE-FLOAT 0.0).

In this case, power is of type unsigned-byte, and can't be complex.

description: updated
Stas Boukarev (stassats)
Changed in sbcl:
assignee: nobody → Stas Boukarev (stassats)
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
assignee: Stas Boukarev (stassats) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.