Re: Almost succesfull build on AIX

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

Subject: Re: Almost succesfull build on AIX
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Thu 08 Jul 1999 - 07:35:37 EST


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

Thomas Vogels <tov@infiniti.ece.cmu.edu> writes:

> "Kurt" == Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:
>
> >> Here's the problem:
> >>> 1/0
> >> [1]INF
> >>> is.finite(1/0)
> >> [1] TRUE
>
> Much to my surprise, a 'printf ("%g", 1/.0)' prints INF in a C
> program. Should this not result in a floating point exception?

Not according to IEEE specs (but integer divide by zero is generally
unmaskable). The interesting thing is that is.finite returns TRUE on
the result, and the printing also suggests that the infinite value is
not recognised internally (if it were, it would get printed as
> 1/0
[1] Inf
)

It would be nice to see the actual bit pattern of 1/.0. Could one of
you do something like

        x = 1/.0;
        printf("%0x,%0x\n", ((int *) &x)[0], ((int *) &x)[1]);

or whatever other obfuscation works on AIX...

-- 
   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:05 EST