rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

acosh(1/7),numer; FAILS after FLOATING-POINT-OVERFLOW signalled #2630

Open rtoy opened 1 month ago

rtoy commented 1 month ago

Imported from SourceForge on 2024-07-06 17:08:00 Created by billingd on 2018-01-09 11:59:59 Original: https://sourceforge.net/p/maxima/bugs/3382


This is distilled from [bugs:#3373] Running the test suite twice causes errors.

numerical evaluation of acosh(1/7) fails after an expression that raises lisp error "arithmetic error FLOATING-POINT-OVERFLOW signalled" under 64-bit Lisp SBCL 1.4.2 under windows 10.

May be a lisp bug as it isn't seen with clisp.

Maxima 5.41post http://maxima.sourceforge.net
using Lisp SBCL 1.4.2
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)  acosh(1/7),numer;

(%o1)                        1.427448757889531 %i
(%i2) 2*?most\-negative\-double\-float;

Maxima encountered a Lisp error:

 arithmetic error FLOATING-POINT-OVERFLOW signalled
Operation was (* -1.7976931348623157e308 2.0).

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i3) acosh(1/7),numer;

Maxima encountered a Lisp error:

 arithmetic error FLOATING-POINT-OVERFLOW signalled

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
rtoy commented 1 month ago

Imported from SourceForge on 2024-07-06 17:08:01 Created by billingd on 2018-01-09 12:03:28 Original: https://sourceforge.net/p/maxima/bugs/3382/#c081


Looks like bug in sbcl-1.4.2 (64-bit) under windows 10

This is SBCL 1.4.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

WARNING: the Windows port is fragile, particularly for multithreaded
code.  Unfortunately, the development team currently lacks the time
and resources this platform demands.
* (acosh (/ 1.0 7.0))

#C(-0.0 1.4274487)
* (cos (/ 1.0 7.0))

0.98981327
* (* 2 most-positive-double-float)

debugger invoked on a FLOATING-POINT-OVERFLOW in thread
#<THREAD "main thread" RUNNING {10027900C3}>:
  arithmetic error FLOATING-POINT-OVERFLOW signalled
Operation was (* 1.7976931348623157d308 2.0d0).

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.

(SB-KERNEL:TWO-ARG-* 2 1.7976931348623157d308)
0] 1

1
0] (cos (/ 1.0 7.0))

0.98981327
0] (acosh (/ 1.0 7.0))
; in: * 2
;     (ACOSH (/ 1.0 7.0))
;
; caught STYLE-WARNING:
;   Lisp error during constant folding:
;   arithmetic error FLOATING-POINT-OVERFLOW signalled
;
; compilation unit finished
;   caught 1 STYLE-WARNING condition

debugger invoked on a FLOATING-POINT-OVERFLOW in thread
#<THREAD "main thread" RUNNING {10027900C3}>:
  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] Reduce debugger level (to debug level 1).
  1:         Exit debugger, returning to top level.

("bogus stack frame")
rtoy commented 1 month ago

Imported from SourceForge on 2024-07-06 17:08:05 Created by billingd on 2018-01-09 12:04:01 Original: https://sourceforge.net/p/maxima/bugs/3382/#d985


rtoy commented 1 month ago

Imported from SourceForge on 2024-07-06 17:08:08 Created by robert_dodier on 2018-01-09 19:32:37 Original: https://sourceforge.net/p/maxima/bugs/3382/#f7b1


For the record, I don't see the error in the second evaluation of (acosh (/ 1.0 7.0)).

I tried it with SBCL 1.3.13 on x86 Linux and SBCL 1.3.20 on x86_64 Linux.