R: Exponent returning infinity

只谈情不闲聊 提交于 2020-08-12 01:29:28

问题


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 :)


回答1:


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


来源:https://stackoverflow.com/questions/45436913/r-exponent-returning-infinity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!