Uncaught float conversion error during constant folding of * with multiple arguments

Bug #1749588 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(compile nil '(lambda () (* 213469366966812475 -253746006468889 33554426 1.0)))

==>

Too large to be represented as a SINGLE-FLOAT:
  1817542572045340440876022928067122807150
[...]
  0: ((LABELS SB-BIGNUM::CHECK-EXPONENT :IN SB-BIGNUM:BIGNUM-TO-FLOAT) #<unavailable argument> #<unavailable argument> #<unavailable argument>)
  1: ((LABELS SB-BIGNUM::FLOAT-FROM-BITS :IN SB-BIGNUM:BIGNUM-TO-FLOAT) 206630676663619266887815754 #<unavailable argument>)
  2: (SB-KERNEL:%SINGLE-FLOAT -1817542572045340440876022928067122807150)
  3: (SB-KERNEL:TWO-ARG-* -1817542572045340440876022928067122807150 1.0)
  4: (* -1817542572045340440876022928067122807150 1.0)
  5: (SB-C::REDUCE-CONSTANTS * (213469366966812475 -253746006468889 33554426 1.0) NUMBER)
  6: (SB-C::SOURCE-TRANSFORM-TRANSITIVE * (213469366966812475 -253746006468889 33554426 1.0) 1 NUMBER (VALUES))
[...]

Note that this does NOT happen if the integer is computed in a nested * form.

(compile nil '(lambda () (* (* 213469366966812475 -253746006468889 33554426) 1.0)))

==> error is caught during the compile

Revision history for this message
Stas Boukarev (stassats) wrote :

6ea220e4c1622eba1eb4a784f4b8f8e1d9e5a4e7

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
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.