Skip to content

floor(NaN) problem fixed in massdist.c (PR#291)

1 message · Martin Maechler

#
Dear Naoki,
Thank you very much,

for your detailed bug report and your proposed patch.
Thank you so much for finding this!

However, this is clearly a bug of (your version of) gcc, respectively libm
on Alpha/Linux.
In general, we do rely on IEEE Arithmetic working correctly.
Instead of  isnan () , it should rather be ISNAN() [an R defined macro]
which is true for both NaN and NA.
(note that we also try to have a working ISNAN() when there's no isnan()
available from C
  (note that ANSI or POSIX C  unfortunately do NOT require IEEE arithmetic!)

I'll have a look at the code and your proposed patch.

Thanks again!