gsl-shell-info
[Top][All Lists]
Advanced

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

Re: [Gsl-shell-info] 0/0 and nan


From: Francesco
Subject: Re: [Gsl-shell-info] 0/0 and nan
Date: Thu, 09 Jan 2014 20:56:48 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 09/01/2014 12:14, Lesley De Cruz wrote:
On 9 January 2014 00:25, elton wang <address@hidden> wrote:
In gsl-shell 2.3.1 windows version, why 0/0 == 0/0 returns true?
in Lua 5.1,  0/0 == 0/0 returns false.
thanks,
That's because gsl-shell is compiled with the -ffast-math flag, which
(surprisingly!) disables nans and infs -- ouch.

Thank you Lesley for looking at that. Actually this is not entirely surprising to me, the --fast-math option let you have faster operations by disregarding some IEEE754 rules for floating point operations. Yet I was not really aware of this non-conforming behavior.

I'm wondering is I shouldn't turn off the --fast-math option from the build flags in gsl shell. I guess it is better to stick with the standards even if it does means a slight decrease in
execution speed.

Francesco



reply via email to

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