Skip to content
Prev 5884 / 398506 Next

NA in C/C++

On Sun, 28 May 2000 cstrato at EUnet.at wrote:

            
Unfortunately, we found isnan is not 100% reliable.  R defines

int R_IsNaNorNA(double);

for that purpose, and makes sure it works on all the platforms.
(Note that some platforms that have isnan are marked as non-IEEE
by the configure process.)

My memory is that the real mess came with finite() and Inf/-Inf (at least
one compiler had Inf < 3 true), but we also had problems with isnan
returning a value which differed from true (as in 1 == 1).