a<--2267046163.857410 > a [1] -2267046164 > b<- 0.00050025 > b [1] 0.0005...">

R rounding numbers

quick question, why does R round my "a" value?

> a<--2267046163.857410
> a
[1] -2267046164
> b<- 0.00050025
> b
[1] 0.00050025

"b" looks fine, but a is rounded, which causes me problems, because I multiply a by b and get

> a*b
[1] -1134090

where i expect to get -1134089.843

thank

+4
source share

Source: https://habr.com/ru/post/1584920/


All Articles