From p.dalgaard at biostat.ku.dk  Wed May 11 20:28:05 2005
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Wed May 11 20:28:13 2005
Subject: [Rd] bug in modulus operator %% (PR#7852)
In-Reply-To: <20050511181000.99727E186@slim.kubism.ku.dk>
References: <20050511181000.99727E186@slim.kubism.ku.dk>
Message-ID: <x2ekcdpqh6.fsf@turmalin.kubism.ku.dk>

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


[Rd] bug in modulus operator %% (PR#7852)
Peter Dalgaard