[R] trunc/floor a number -- strange bahaviour

2009-02-12 Thread Žroutík
Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n - 12.357531 Then the following command: n - (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still as expected [1] 10=== not

Re: [R] trunc/floor a number -- strange bahaviour

2009-02-12 Thread ONKELINX, Thierry
/floor a number -- strange bahaviour Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n - 12.357531 Then the following command: n - (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still

Re: [R] trunc/floor a number -- strange bahaviour

2009-02-12 Thread Duncan Murdoch
On 2/12/2009 10:20 AM, Žroutík wrote: Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n - 12.357531 Then the following command: n - (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still as