Re: formatReal()-bug (or Is there anybody out there w/o IEEE754?)

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: formatReal()-bug (or Is there anybody out there w/o IEEE754?)
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Thu 14 Oct 1999 - 01:17:53 EST


Message-ID: <x2so3f8f31.fsf@blueberry.kubism.ku.dk>

Thomas Hoffmann <hoffmann@ehmgs2.et.tu-dresden.de> writes:

> On a system with IEEE_754 undefined, I run into an bug, when the value
> of an element of the first argument (e.g., x[0]) of formatReal() is NA:
>
> 1. (format.c:235) if (!R_FINITE ..) gives nanflag=1 (!naflag remains 0)
> 2. (format.c:272..288) *m gets an value of -2147483643 (from the format
> fiddling, should not matter to us)
> 3. (format.c:289) because naflag is zero, m does not get the value of
> R_print.na_width and we get back the unbelievable value
> from 2.
>
> This crashes R in commands as
> as.vector(NA,mode="double")
> .

If a system isn't IEEE, it might not know about NaN either, so I
suspect that one wants naflag = 1 rather than nanflag = 1.

Could you try it and report back?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:09 EST