Because of a change I did in the lazyNumbers package, I have to post a correction to my previous post.
as.double function, called on a lazy number, was not
stable. Now it is. In the previous post, the following equality was
library(lazyNumbers) x <- 1 - lazynb(7) * 0.1 as.double(x) == 0.3 ##  FALSE
It is not true anymore. This is expected actually. Indeed, the double
0.3 do not exactly represent
the numbers \(0.1\) and
print(0.1, digits = 17L) ##  0.10000000000000001 print(0.3, digits = 17L) ##  0.29999999999999999
The double representation of whole numbers is exact. The following equality is true:
library(lazyNumbers) x <- 1 - lazynb(7) / 10 as.double(x) == 0.3 ##  TRUE
No other change, and nothing else to correct. It is time to submit the package to CRAN. See the Github repository for another short presentation of this package.