cmath isnan function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to compile a test program to see about the isnan function
on my system (apple darwin w/ gcc version 3.3 20030304 (Apple
Computer, Inc. build 1671).  Here's the code:

#include <cmath>
int main()
{
 float x=sqrt(-1);
 return isnan(x);
}

Here's the output:

gcc -o main main.cpp
main.cpp: In function `int main()':
main.cpp:5: error: `isnan' undeclared (first use this function)
main.cpp:5: error: (Each undeclared identifier is reported only once for each 
   function it appears in.)

This is baffling since cmath is included and it redifines the macros
which it includes from math.h.  I completely stumped here and would
appreciate any help.

thanks,
wes


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux