[R] julian() and numerical noise
Andreas Eckner
andreas at eckner.com
Fri Mar 23 15:45:25 CET 2012
Hi,
does anybody know if the following behavior of julian() is intentional?
> julian(2, 1, 2012) - julian(2 - 1e-15, 1, 2012)
[1] 1
> julian(2, 1, 2012) - julian(2, 1 - 1e-15, 2012)
[1] 0
> julian(2, 1, 2012) - julian(2, 1, 2012 - 1e-15)
[1] 0
In other words, julian() is subject to numerical noise in the 'day'
argument, but not in the 'month' and 'year' argument? Another example:
> julian(2 - 1e-15, 1, 2012) - julian(1 - 1e-15, 1, 2012)
[1] 30
Thanks,
Andreas
More information about the R-help
mailing list