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

Bug #1749588 reported by Paul F. Dietz on 2018-02-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
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

Stas Boukarev (stassats) wrote :

6ea220e4c1622eba1eb4a784f4b8f8e1d9e5a4e7

Changed in sbcl:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers