[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gsl-shell-info] 0/0 and nan
From: |
Lesley De Cruz |
Subject: |
Re: [Gsl-shell-info] 0/0 and nan |
Date: |
Fri, 10 Jan 2014 23:40:45 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Thu, Jan 09, 2014 at 08:56:48PM +0100, Francesco wrote:
> 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.
IMHO it's very risky to not allow nans and inf! I'd opt to stay IEEE
compliant and drop the -ffast-math flag altogether.
Why would even it be significantly faster? For compiled Lua code the JIT
will handle the math anyway (at least on the common desktop platforms),
and the rest depends mostly on how the GSL libs were compiled. And
compiler flags can be misleading... just like -O3 is worse than -O2, I
wouldn't be surprised if -ffast-math yields slower math ;-)
--
Best regards,
Lesley