Re: [Rd] error in trunc function (PR#9782)

From: <ripley_at_stats.ox.ac.uk>
Date: Mon, 16 Jul 2007 12:43:01 +0200 (CEST)


The result is correct. The representation of 2.3 is slightly less than 2.3: non-binary fractions cannot be represented exactly.

> 2.3*100 - 230
[1] -2.842171e-14

On Fri, 6 Jul 2007, focus17_at_libero.it wrote:

> Full_Name: Claudio
> Version: 2.5.1
> OS: windows
> Submission from: (NULL) (157.138.120.198)
>
>
> the command get a wrong result
>
>> trunc(2.3*100)
> 229
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley_at_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_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 16 Jul 2007 - 10:57:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jul 2007 - 14:36:46 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.