[英]How can I edit the mantissa of a double/float in R?
我正在寻找c ++中的frexp
和ldexp
东西,或者其他与IEEE 754格式直接兼容的东西。
You can use the frexpZ
function in the gmp
package, or the frexp
function in the accuracy
package. 您可以使用
frexpZ
在功能gmp
包,或frexp
在功能accuracy
包。 The latter package is archived, so you'll have to do something like 后一个程序包已存档,因此您必须执行以下操作
devtools::install_version("accuracy","1.35")
to install it (look in the package archive to identify the latest version; you'll also need to have compilation tools installed). 进行安装(在程序包归档文件中查找以标识最新版本;还需要安装编译工具)。
frexp
says it is just a wrapper around the C math library function. frexp
说它只是C数学库函数的包装。
I found these via sos::findFn("frexp")
我通过
sos::findFn("frexp")
找到了这些
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.