Re: NaN/Inf fix for ECPG - Mailing list pgsql-hackers

From Rémi Zara
Subject Re: NaN/Inf fix for ECPG
Date
Msg-id 071DF5FD-0A11-48DD-ADAA-A0CA6AC2A89C@mac.com
Whole thread Raw
In response to Re: NaN/Inf fix for ECPG  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: NaN/Inf fix for ECPG
List pgsql-hackers
Le 24 févr. 2010 à 18:58, Boszormenyi Zoltan a écrit :
>
> Here's the attached test code. Compile it with
>
> gcc -Wall -o nantest nantest.c -lm
>
> and run it. It tests NAN anf INFINITY values with isinf() and isnan().
> The expected output is:
>
> ==================
> $ ./nantest
> computed NAN
> 1 0
> computed INFINITY
> 0 1
> ==================
>
> Instead of "computed", NetBSD/x86-64 prints "defined"
> but the test results are the same as under Linux/x86-64.
>

Here it is :

-bash-4.1$ gcc -Wall -o nantest nantest.c -lm
-bash-4.1$ ./nantest
defined NAN
0 1
defined INFINITY
0 1

Ok. So, on NetBSD/mips (#ifdef __NetBSD__ && __mips__), isnan(NAN) is true, isnan((double)NAN) is false, and
isnan((double)(0.0/ 0.0)) is true. 

Regards,

Rémi Zara

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: query cancel issues in contrib/dblink
Next
From: "Joshua D. Drake"
Date:
Subject: Re: pg_stop_backup does not complete