From w.northcott at unsw.edu.au  Fri Jan  7 00:56:05 2005
From: w.northcott at unsw.edu.au (Bill Northcott)
Date: Fri Jan  7 00:56:37 2005
Subject: [Rd] Standalone Mathlib, C++ and ISNAN()
In-Reply-To: <1105010211.3643.5.camel@seurat>
References: <77B2A8C4-5ED8-11D9-97FA-000393D3D676@unsw.edu.au>
	<Pine.A41.4.61b.0501050759060.100170@homer05.u.washington.edu>
	<C2214FA4-5F4F-11D9-97FA-000393D3D676@unsw.edu.au>
	<Pine.A41.4.61b.0501051149490.59084@homer03.u.washington.edu>
	<DB4A6959-5F60-11D9-97FA-000393D3D676@unsw.edu.au>
	<1105010211.3643.5.camel@seurat>
Message-ID: <875A8E98-603E-11D9-97FA-000393D3D676@unsw.edu.au>

On 06/01/2005, at 10:16 PM, Martyn Plummer wrote:
> I think the workaround is supposed to look like this:
> #define _GLIBCPP_USE_C99 1
> #include <cmath>
> #undef _GLIBCPP_USE_C99
> #include <iostream>
>
> using __gnu_cxx::isnan;

I thought I had tried that, but I was not sure.  So I tried again this 
morming, and it definitely does not work on MacOS X.  The problem being 
that the undefs in cmath are unconditional.

I presume it works on Linux because isnan is a function.

Bill Northcott


[Rd] Standalone Mathlib, C++ and ISNAN()
Bill Northcott