John_Doe
John_Doe

Reputation: 95

R: Exponent returning infinity

I need to remove logarithms of my data and thus am taking e to the power of the values which are logarithmed.

My issue is that when I have e to the power of more than 709 R returns the value of infinity. How can I surpass this?

e^710 [1] Inf

Thanks :)

Upvotes: 0

Views: 2911

Answers (1)

Andrey Kolyadin
Andrey Kolyadin

Reputation: 1321

If you really want to work with numbers that big you can use a Rmpfr package.

library('Rmpfr')

x <- mpfr(710, precBits = 106)
exp(x)

1 'mpfr' number of precision  106   bits 
[1] 2.233994766161711031253644458116e308

Upvotes: 2

Related Questions