From w.northcott at unsw.edu.au  Sun Jan  9 01:09:18 2005
From: w.northcott at unsw.edu.au (Bill Northcott)
Date: Sun Jan  9 01:09:38 2005
Subject: [Rd] Standalone Mathlib, C++ and ISNAN()
In-Reply-To: <Pine.A41.4.61b.0501081406410.219908@homer04.u.washington.edu>
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>
	<Pine.A41.4.61b.0501051405010.59084@homer03.u.washington.edu>
	<82D986EA-5F6F-11D9-97FA-000393D3D676@unsw.edu.au>
	<16860.48925.390153.388499@devzero.bogus.domain>
	<E87B67C7-5FC7-11D9-97FA-000393D3D676@unsw.edu.au>
	<Pine.A41.4.61b.0501081406410.219908@homer04.u.washington.edu>
Message-ID: <B45E7F7C-61D2-11D9-97FA-000393D3D676@unsw.edu.au>

On 09/01/2005, at 9:11 AM, Thomas Lumley wrote:
> The C++ math header undefines isnan, so if isnan is a macro, ISNAN() 
> will not work in C++ code.
>
> C99 specifies that isnan is a macro, but in C90 compilers, where it is 
> an extension, isnan is often a function (explaining why the issue 
> didn't come up earlier). For example, isnan is a macro on my Mac 
> laptop but a function on my Linux desktop.
>
> R-devel now defines ISNAN to call a function if used in C++ code. It 
> still calls isnan in C code.

Many thanks for that.

Does this mean the changes will be in the current daily builds?
I presume the function involved is now in the standalone Rmath build.

Bill Northcott


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