BUG REPORT: "NAN" defined incorrectly in

bridged with qnx.development_tools
Post Reply
John Nagle

BUG REPORT: "NAN" defined incorrectly in

Post by John Nagle » Tue Jun 22, 2004 2:06 am

(QNX 6.2.1 PE)
This is the definition of NAN in "math.h":

#define NAN (1.0/1.0)

That has a value of 1.0, which would appear to be incorrect.

Nor do you want to write (1.0/0.0). That's INF, not NAN.

John Nagle

David Bacon

Re: BUG REPORT: "NAN" defined incorrectly in

Post by David Bacon » Tue Jun 22, 2004 2:28 am

(0.0/0.0) would be a good choice, of course.

This is fixed in 6.3.0.

dB

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
John Nagle wrote ~ Mon, 21 Jun 2004 19:06:18 -0700:
(QNX 6.2.1 PE)
This is the definition of NAN in "math.h":

#define NAN (1.0/1.0)

That has a value of 1.0, which would appear to be incorrect.

Nor do you want to write (1.0/0.0). That's INF, not NAN.

John Nagle

John Nagle

Re: BUG REPORT: "NAN" defined incorrectly in

Post by John Nagle » Tue Jun 22, 2004 5:41 pm

OK, thanks.

Fortunately, for C++ users, "quiet_NaN()" is defined
correctly for "float" and "double" in "limits".

John Nagle

David Bacon wrote:
(0.0/0.0) would be a good choice, of course.

This is fixed in 6.3.0.

dB

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
John Nagle wrote ~ Mon, 21 Jun 2004 19:06:18 -0700:

(QNX 6.2.1 PE)
This is the definition of NAN in "math.h":

#define NAN (1.0/1.0)

That has a value of 1.0, which would appear to be incorrect.

Nor do you want to write (1.0/0.0). That's INF, not NAN.

John Nagle

Post Reply

Return to “qnx.development_tools”