Curtis L. Olson schrieb:
Log Message:
I don't understand why FreeBSD doesn't see isnan() after including math.h
but it doesn't. Trying the apple approach to fixing isnan results in an
infinite loop (making me wonder what happens on OSX?) This is an alternative
approach to checking isnan() on
Christian Mayer wrote:
+ #if defined (__FreeBSD__)
+ inline int isnan(double r) { return !(r 0 || r 0); }
+ #endif
This test will break if r == 0
Oops, duhhh! Thanks!
Curt.
--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear
On Sonntag 21 November 2004 22:46, Curtis L. Olson wrote:
Christian Mayer wrote:
+ #if defined (__FreeBSD__)
+ inline int isnan(double r) { return !(r 0 || r 0); }
+ #endif
This test will break if r == 0
According to IEEE, NaN is the only fp value that is not equal to itself. That