Re: NaN/Inf fix for ECPG

From: Rémi Zara <remi_zara(at)mac(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: NaN/Inf fix for ECPG
Date: 2010-02-24 19:45:12
Message-ID: 071DF5FD-0A11-48DD-ADAA-A0CA6AC2A89C@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-02-24 19:45:24 Re: query cancel issues in contrib/dblink
Previous Message Erik Rijkers 2010-02-24 19:40:14 testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset