dimanche 11 janvier 2015

Operations on long numbers in R


Vote count:

0




I aim to use maximum likelihood methods with a probability distribution that creates very big integers and very small float values that cannot be stored as a numeric nor a in a float type.


I thought I would use the as.bigq in the gmp package. My issue is that one can only add, substract, multiply and dived two objects of class/type bigq, while my distribution actually contains logarithm, power, gamma and confluent hypergeometric functions.


What is my best option to deal with this issue?



  • Should I use another package?

  • Should I code all these functions for bigq objects.

    • Coding these function on R may cause some functions to be very slow, right?

    • How to write the logarithm function using only the +,-,,/ operators? I could approximate it this function using a taylor series expansion.

    • How to write the power function using only the +,-,,/ operators when the exponent is not an integer?

    • How to write the confluent hypergeometric function (the equivalent of the Hypergeometric1F1Regularized[..] function in Mathematica)?




I could eventually write these functions in C and call them from R but it sounds like some complicated work for not much, especially if I have to use the gmp package in C as well to handle these big numbers.



asked 1 min ago

Remi.b

1,234






Operations on long numbers in R

Aucun commentaire:

Enregistrer un commentaire