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

2007-07-16 Thread Peter Dalgaard
[EMAIL PROTECTED] 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 > > __ Not a bug, read FAQ 7.31 and the reference therein. -- O__ Peter Dalgaard

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

2007-07-16 Thread ripley
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, [EMAIL PROTECTED] wrote: > Full_Name: Claudio > Version: 2.5.1 > OS: windows > Submission from: (NULL) (157.138.

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

2007-07-16 Thread Duncan Murdoch
[EMAIL PROTECTED] 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 That is the correct answer. 2.3 is not representable exactly; the actual value used is slightly less

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

2007-07-16 Thread focus17
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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel