如何获得 R 中的机器 epsilon? [英] How do I obtain the machine epsilon in R?

查看:126
本文介绍了如何获得 R 中的机器 epsilon?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 R 中是否有一个常量可以存储机器 epsilon?

Is there a constant that stores the machine epsilon in R?

推荐答案

在我的 32 位 Linux 上试试 .Machine$double.eps -- 和 .Machine机器产生这个:

Try .Machine$double.eps -- and .Machine which on my 32-bit Linux machine yields this:

R> .Machine
$double.eps
[1] 2.220e-16

$double.neg.eps
[1] 1.110e-16

$double.xmin
[1] 2.225e-308

$double.xmax
[1] 1.798e+308

$double.base
[1] 2

$double.digits
[1] 53

$double.rounding
[1] 5

$double.guard
[1] 0

$double.ulp.digits
[1] -52

$double.neg.ulp.digits
[1] -53

$double.exponent
[1] 11

$double.min.exp
[1] -1022

$double.max.exp
[1] 1024

$integer.max
[1] 2147483647

$sizeof.long
[1] 4

$sizeof.longlong
[1] 8

$sizeof.longdouble
[1] 12

$sizeof.pointer
[1] 4

R> 

这篇关于如何获得 R 中的机器 epsilon?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆