gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maxima-discuss] Careful arithmetic ... was Re: +-Inf and NaN


From: Camm Maguire
Subject: Re: [Maxima-discuss] Careful arithmetic ... was Re: +-Inf and NaN
Date: Tue, 05 Mar 2024 09:05:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Greetings!

Richard Fateman <fateman@gmail.com> writes:

> 2. fix sbcl flags so that the handler still works after the first 
> floating-point error..

Not sure about sbcl, but this sounds like the standard IEEE SIGFPE
handling in which it is impossible to continue or return from the
instruction raising the signal without disabling the trap.  One can
lonjmp somewhere else leaving the trap in place.  It is not clear if
this explains your results as it does not appear you are trying to
continue.  See the following in GCL:

=============================================================================

>(fpe::break-on-floating-point-exceptions :floating-point-overflow t)

(:FLOATING-POINT-OVERFLOW)

>(expt 2.0 1000000)

Correctable error: 
Fast links are on: do (si::use-fast-links nil) for debugging
Signalled by EXPT.
If continued: Continue disabling floating point exception trapping
INTERNAL-SIMPLE-FLOATING-POINT-OVERFLOW: 
Arithmetic error when performing (:INSN "mulsd  0x8(%rsp),%xmm0 ;" :OP ...) on 
(1.3407807929942598E154 1.3407807929942598E154): 

Broken at EXPT.  Type :H for Help.
    1 (continue) Continue disabling floating point exception trapping 
    2  Return to top level. 
>>1

#<inf>

>(expt 2.0 1000000)

#<inf>

>(fpe::break-on-floating-point-exceptions :floating-point-overflow t)

(:FLOATING-POINT-OVERFLOW)

>(expt 2.0 1000000)

Correctable error: 
Fast links are on: do (si::use-fast-links nil) for debugging
Signalled by EXPT.
If continued: Continue disabling floating point exception trapping
INTERNAL-SIMPLE-FLOATING-POINT-OVERFLOW: 
Arithmetic error when performing (:INSN "mulsd  0x8(%rsp),%xmm0 ;" :OP ...) on 
(1.3407807929942598E154 1.3407807929942598E154): 

Broken at EXPT.  Type :H for Help.
    1 (continue) Continue disabling floating point exception trapping 
    2  Return to top level. 
>>2

Top level.
>(expt 2.0 1000000)


Correctable error: 
Fast links are on: do (si::use-fast-links nil) for debugging
Signalled by EXPT.
If continued: Continue disabling floating point exception trapping
INTERNAL-SIMPLE-FLOATING-POINT-OVERFLOW: 
Arithmetic error when performing (:INSN "mulsd  0x8(%rsp),%xmm0 ;" :OP ...) on 
(1.3407807929942598E154 1.3407807929942598E154): 

Broken at EXPT.  Type :H for Help.
    1 (continue) Continue disabling floating point exception trapping 
    2  Return to top level. 
>>2

Top level.
>

=============================================================================

Take care,
-- 
Camm Maguire                                        camm@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]