0.65 HPUX/AIX update

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Fri, 23 Jul 1999 15:18:03 +0200 (CEST)

The current situation is as follows.


* I still need f77 for linking.  Using ld with the suggested flags gives
  a binary with `exec format error'.  The problem seems to be with an
  unreferenced __start.

* The floating point (finite|isnan) stuff is strange, but under control,
  I think.  Plain cc works, gcc has a problem and seems to need having
  prototypes turned off for IEEE fp.  (More below.)

* Apart from that, make check goes all the way through at least for me
  under both cc/f77/make and gcc/f77/make.


* make check fails in arith-true.R.  The problem is that

        is.infinite(.Machine$double.base ^ .Machine$double.max.exp)

gives FALSE.


> .Machine$double.base
[1] 2
> .Machine$double.max.exp
[1] 1024
> 2 ^ 1024
[1] 1.797693e+308
> 2 ^ 1025
[1] 1.797693e+308
> 2 ^ 2024
[1] 1.797693e+308


Here are some observations re IEEE fp.  I have the following small test

#include <math.h>
#include <stdio.h>

main () {
    printf("1/0: %lf 0/0: %lf\n", 1./0., 0./0.);
    printf("finite(1/0): %d\n", finite(1./0.));
    printf("isnan(0/0): %d\n", isnan(0./0.));
    printf("log(0.): %lf\n", log(0.));

Under Linux, this gives:

1/0: Inf 0/0: NaN
finite(1/0): 0
isnan(0/0): -1
log(0.): -Inf

Under HPUX:

1/0: ++.000000 0/0: ?.000000
finite(1/0): 0
isnan(0/0): 1
log(0.): -179769313486231571000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000

This is also why log(0) is broken on HPUX.  See also the above why make
check fails.  However, the finite and isnan test is o.k.

Under AIX with cc:

1/0: INF 0/0: NaNQ
finite(1/0): 0
isnan(0/0): 1
log(0.): -INF

Under AIX with gcc:

1/0: INF 0/0: NaNQ
finite(1/0): 1
isnan(0/0): 1
log(0.): -INF

So there is a problem in the finite() test with gcc.  It somehow is
related to the use of ANSI C prototypes, and disappears if we define
_NO_PROTO.  I am in the process of adding this as a short term fix, but
we should think a bit more about that.

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