[CLN-list] floating point overflow

Richard B. Kreckel kreckel at ginac.de
Tue Jun 3 22:57:45 CEST 2008


David van der Spoel wrote:
> I get the following message when trying to do a rather complex piece of 
> code:
> 
> terminate called after throwing an instance of 
> 'cln::floating_point_overflow_exception'
>    what():  floating point overflow.
> 
> 
> I am running on a Mac in 64/Intel bit mode as per the instructions in 
> previous posts, with GMP.
> 
> This is using cl_F with 100 decimals precision throughout.
> 
> Any clue what causes this and how to prevent it?

This is caused by a biased binary exponent of a cl_LF exceeding 
2^63-1=9223372036854775807. Please check your code: Do such huge numbers 
really really really occur in your algorithm?

Using gdb, you may try setting a catchpoint, as described in the manual, 
to obtain a stack backtrace of the point where the exception is thrown.

Regards
    -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list