Displaying 1 result from an estimated 1 matches for "pocetcyklu".
2009 Feb 12
3
trunc/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 as expected
[1] 10 === not expected, count with me: 1 - floor(1) is zero, times
10 gives 0, not 10!!!!
[1] 10 === should