R:指数返回无穷大 [英] R: Exponent returning infinity
本文介绍了R:指数返回无穷大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要删除我的数据的对数,因此将e用作对数值的幂.
I need to remove logarithms of my data and thus am taking e to the power of the values which are logarithmed.
我的问题是,当我拥有大于709 R的幂的e时,将返回无穷大的值.我该如何超越呢?
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
e^710 [1] Inf
谢谢:)
推荐答案
如果您真的想使用较大的数字,则可以使用Rmpfr
包.
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
这篇关于R:指数返回无穷大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文