Re: [Rd] zapsmall (PR#7755)

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 29 Mar 2005 - 15:12:50 GMT

On Tue, 29 Mar 2005 vosp@mail.ecu.edu wrote:

> Full_Name: Paul Vos
> Version: 2.0.1
> OS: windows XP
> Submission from: (NULL) (150.216.148.20)
>
>
>> zapsmall(.3-.2-.1,digits=7)
> [1] -2.775558e-17
>
> This should be zero.

Why `should' it? The documentation says:

      'zapsmall' determines a 'digits' argument 'dr' for calling
      'round(x, digits = dr)' such that values "close to zero" (compared
      with the maximal absolute one) are "zapped", i.e., treated as '0'.

That value is not small compared with the maximal absolute one: it is equal to it.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Mar 30 01:15:54 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:26:32 GMT