Bug #2000435 “(expt 2.0 1024) triggers FLOATING-POINT-OVERFLOW o…” : Bugs : SBCL

I came across this behavior while investigating a bug in the Maxima Computer Algebra System. When first evaluating (expt 2.0 1024), a FLOATING-POINT-OVERFLOW error is triggered. Evaluating the same expression again afterwards then results in #.SINGLE-FLOAT-POSITIVE-INFINITY. Is this intended behavior or a bug?

This is SBCL 2.2.11 […]

* (expt 2.0 1024)

debugger invoked on a FLOATING-POINT-OVERFLOW in thread
#<THREAD “main thread” RUNNING {1001080003}>:
  arithmetic error FLOATING-POINT-OVERFLOW signalled

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(“bogus stack frame”)
0] 0

* (expt 2.0 1024)
#.SINGLE-FLOAT-POSITIVE-INFINITY

Read more here: Source link