Re: Question on performance
On 2010-10-15 06:37:54 -0400, Michel Hack wrote:
> Vincent Lef?vre a ?crit:
> > ... It's strange that GCC doesn't replace isnan() by a test x != x
>
> Perhaps because these are NOT equivalent?
I think they are on conforming code.
> They differ for SNaN.
sNaN is undefined behavior in ISO C99:
F.2.1 Infinities, signed zeros, and NaNs
This specification does not define the behavior of signaling NaNs.
So, the transformation is OK.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)