[Flightgear-devel] Re: [Simgear-cvslogs] CVS: source/simgear/sound soundmgr_openal.cxx, 1.7, 1.8

2004-11-21 Thread Christian Mayer
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

Re: [Flightgear-devel] Re: [Simgear-cvslogs] CVS: source/simgear/sound soundmgr_openal.cxx, 1.7, 1.8

2004-11-21 Thread Curtis L. Olson
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

Re: [Flightgear-devel] Re: [Simgear-cvslogs] CVS: source/simgear/sound soundmgr_openal.cxx, 1.7, 1.8

2004-11-21 Thread Mathias Fröhlich
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