Re: [Rd] bug in modulus operator %% (PR#7852)

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 11 May 2005 - 18:28:05 GMT

kjetil@acelerate.com writes:

> The following can't be right,
> first rw2010:
>
> > 1 %% 0.001
> [1] 0.001
>
> Then rw2001:
>
> > 1 %% 0.001
> [1] -2.081668e-17
> >
>
> and the last seems about right.

A negative remainder? I don't think so. Presumably the result comes from

    o %% now warns if its accuracy is likely to be affected by lack

        of precision (as in 1e18 %% 11, the unrealistic expectation of
        PR#7409), and tries harder to return a value in range when it
        is.

So, not a bug.

-- 
   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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu May 12 04:31:44 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:05 GMT