[Rd] Solaris10/amd64 + SunSutio Compile (PR#7767)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sat Apr 2 18:40:04 CEST 2005


teru at sodan.ecc.u-tokyo.ac.jp writes:

> Full_Name: Teru KAMOGASHRIA
> Version: 2.0.1
> OS: SunOS sun 5.10 Generic i86pc i386 i86pc
> Submission from: (NULL) (219.5.176.24)
> 
> 
> rbinom.c cannot be compiled because of the casting problem.
> 
> /opt/SUNWspro/bin/cc -I. -I../../src/include -I../../src/include
> -I/usr/local/include -DHAVE_CONFIG_H -D__NO_MATH_INLINES  -g -c rbinom.c -o
> rbinom.o
> "rbinom.c", line 60: operand must have real floating type: op "isfinite"
> cc: acomp failed for rbinom.c
> 
> Following patch may solve this problem.
> 
> *** R-2.0.1.orig/src/nmath/rbinom.c     Mon Nov 15 21:33:01 2004
> --- R-2.0.1/src/nmath/rbinom.c  Sun Apr  3 00:19:52 2005
> ***************
> *** 57,63 ****
>       n = floor(nin + 0.5);
>       if (n != nin) ML_ERR_return_NAN;
> 
> !     if (!R_FINITE(n) || !R_FINITE(pp) ||
>         /* n=0, p=0, p=1 are not errors <TSL>*/
>         n < 0 || pp < 0. || pp > 1.)    ML_ERR_return_NAN;
> 
> --- 57,63 ----
>       n = floor(nin + 0.5);
>       if (n != nin) ML_ERR_return_NAN;
> 
> !     if (!R_FINITE((double)n) || !R_FINITE(pp) ||
>         /* n=0, p=0, p=1 are not errors <TSL>*/
>         n < 0 || pp < 0. || pp > 1.)    ML_ERR_return_NAN;

Hmm... But does it at all make sense to pass an integer to R_FINITE?
and why isn't there a prototype causing automatic casting anyway?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list