Title: | Convert Large Numbers to Bigq Format |
---|---|
Description: | This function converts mfpr, numeric, or character strings representing numbers to bigq format without loss of precision. |
Authors: | Carl Witthoft [aut, cre] |
Maintainer: | Carl Witthoft <[email protected]> |
License: | LGPL-3 |
Version: | 2.0.1 |
Built: | 2024-12-06 06:28:39 UTC |
Source: | CRAN |
This function converts mfpr, numeric, or character strings representing numbers to bigq format without loss of precision.
Package: | go2bigq |
Type: | Package |
Version: | 2.0 |
Date: | 2022-06-02 |
License: | GPL-3 |
Carl Witthoft
Maintainer:Carl Witthoft [email protected]
bigq
with full precision.
Convert a numeric, a character string representing a numeric, or various mpfr
classes to a bigq
fraction. The output has the same precision as the input.
go2bigq(x, ...)
go2bigq(x, ...)
x |
A value of class |
... |
Parameters which could be used to modify the default behavior of |
The input x
, if a list, must contain only one of the allowed classes.
Character strings which represent numbers must be of the form [+,-]X[.]Y[e,E[+,-]Z], where X, Y, and Z are strictly limited to the numerals [0:9]. None of the other character options listed are required (except of course "[+,-]Z" is disallowed unless "[e,E]" exists.)
The function formatMpfr
accepts several arguments to adjust the output character string (number of digits precision, e.g.). go2bigq
passes the ...
objects to formatMpfr
.
A bigq
object containing a vector of bigq
fractions .
Carl Witthoft, [email protected]
.bigq2mpfr
, .bigz2mpfr
, as.bigq
library(Rmpfr) (go2bigq(0.17 + 1:5)) (go2bigq(as.character(0.17 + 1:5))) (go2bigq(mpfr(0.17 + 1:5,100))) as.numeric(go2bigq('017.3200e-10')[1] - go2bigq(0017.3200e-10)[1])
library(Rmpfr) (go2bigq(0.17 + 1:5)) (go2bigq(as.character(0.17 + 1:5))) (go2bigq(mpfr(0.17 + 1:5,100))) as.numeric(go2bigq('017.3200e-10')[1] - go2bigq(0017.3200e-10)[1])