floating point - multiplication R without float -
is there way multiplication float in serie sof 2 multiplications integers. need write function accepts input values such as
3.4556546e-8
1.3
0.134435
instead of doing 100*0.134435 100/1000000 , multiply
134435
the function should output give 1000000 , 134435 - needed because need work large numbers in big integers , mutipliying anythign except intgers doent work
apparently want arbitrary precision arithmetics. don't need reinvent wheel.
library(gmp) x <- as.bigq(0.134435) 100 * x #big rational ('bigq') : # [1] 121088283181110525/9007199254740992
Comments
Post a Comment