[R] Problem with products in R ?

peter dalgaard pdalgd at gmail.com
Sun May 4 16:10:29 CEST 2014


On 04 May 2014, at 14:44 , ARTENTOR Diego Tentor <diegotentor71 at gmail.com> wrote:

> Trying algorithm for products with large numbers i encountered a difference
> between result of 168988580159 * 36662978 in my algorithm and r product.
> The Microsoft calculator confirm my number.
> 

>  168988580159 * 36662978 
[1] 6.195625e+18

That value exceeds the relative precision of floating point numbers (approx 1e-16), so the last few digits are likely to differ from an exact calculation. The "gmp" package is there if you need it.


> Thanks.
> 
> 
> 
> 
> -- 
> 
> 
> *        Gráfica ARTENTOR          *
> 
> de Diego L. Tentor
> Echagüe 558
> Tel.:0343 4310119
> Paraná - Entre Ríos
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list