R语言:意外的精度从min.mpfr调用返回
考虑:
> foob <- as.bigz(5:7)
> min(foob)
Big Integer ('bigz') :
[1] 5
> .bigz2mpfr(prev)
1 'mpfr' number of precision 4 bits
[1] 5
> min(.bigz2mpfr(foob))
1 'mpfr' number of precision 53 bits
[1] 5
> min(mpfr(5:7,5))
1 'mpfr' number of precision 53 bits
[1] 5
我知道mpfr
对象的“最小”方法以某种方式潜入bigz
或bigq
bigq - 类对象的“ min”方法中无法弄清楚精度如何或为什么会碰到如此宽敞的值。谁能详细说明窗帘背后发生了什么?
附录:这似乎只有在我以很小的精度开始的MPFR对象开始时才会发生。如果我从foo&lt; -mpfr(1:5,prec = 60)
开始,那么我在精度值中看不到任何跳跃。
Consider:
> foob <- as.bigz(5:7)
> min(foob)
Big Integer ('bigz') :
[1] 5
> .bigz2mpfr(prev)
1 'mpfr' number of precision 4 bits
[1] 5
> min(.bigz2mpfr(foob))
1 'mpfr' number of precision 53 bits
[1] 5
> min(mpfr(5:7,5))
1 'mpfr' number of precision 53 bits
[1] 5
I know that the 'min' method for mpfr
objects somehow dives into the 'min' method for bigz
or bigq
- class objects but can't figure out how or why the precision gets bumped up to such a larg value. Can anyone detail what's happening behind the curtain?
Addendum: this only seems to happen if I start out with mpfr objects with very small precision. If I start with, say foo <- mpfr(1:5, prec = 60)
then I don't see any jump in the precision value.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些似乎是默认选项,按类型划分,如上所述,缺乏设置的固定限制:
可以请求更高的精度。
从结果中提取的集合仍在刮擦...
These seem to be the default options, by type, absent setting precBit as you do above:
Greater or less precision can be requested.
Still head scratching on extracting from result for sets...