> hist(seq(1E6, 1E7))
Warning in n * h : NAs produced by integer overflow
My understanding is that this comes from the graphics package; in hist.R#131:
dens <- counts/(n*h) # use un-fuzzed intervals
But because 'n' and 'h' are both of integer type, their product can overflow in some cases. Would it make sense to coerce each with `as.numeric()` before computing their product?
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
attached base packages:
 stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
Yes, coercing h makes sense (and is sufficient). It is used in "double" context also in other places.
I'll commit a patch shortly.
How do you guy detect such border cases ?
> How do you guy detect such border cases ?
Our users are very meticulous and inevitably do things that tickle some of the corner cases hiding around R :-)
Fix committed to R-devel (svn rev 75047) ... to be ported to 'R 3.5.1 patched' soon after.
Thank you, Martin!