Rmpfr provides S4 classes and methods for arithmetic including transcendental ("special") functions for arbitrary precision floating point numbers, here often called “mpfr - numbers”. To this end, it interfaces to the LGPL'ed MPFR (Multiple Precision Floating-Point Reliable) Library which itself is based on the GMP (GNU Multiple Precision) Library.
|SystemRequirements:||gmp (>= 4.2.3), mpfr (>= 3.0.0)|
|(C (not R!) libraries; must be installed)|
|Depends:||methods, gmp (>= 0.5-8), R (>= 2.12.0)|
|Imports:||gmp, stats, utils|
|Suggests:||MASS, polynom, sfsmisc (>= 1.0-20), Matrix|
|SuggestNotes:||MASS, polynom, sfsmisc are only needed for vignette; Matrix only because of its test-tools|
|License:||GPL (>= 2)|
The following (help pages) index does not really mention that we provide many
methods for mathematical functions, including
digamma, etc, namely, all of R's (S4)
Math group (with the only exception of
see the list in the examples.
pnorm, the “error function”,
and more, see the list in
further note the first vignette (below).
||Create "mpfr" Numbers (Objects)|
|| Construct "mpfrArray" almost as by
||Class "mpfr" of Multiple Precision Floating Point Numbers|
||Classes "mpfrMatrix" and "mpfrArray"|
||Bernoulli Numbers in Arbitrary Precision|
||Bessel functions of Integer Order in multiple precisions|
||MPFR Number Utilities|
||Binomial Coefficients and Pochhammer Symbol aka|
||Factorial 'n!' in Arbitrary Precision|
||Formatting MPFR (multiprecision) Numbers|
||Rmpfr - Utilities for Precision Setting, Printing, etc|
||Rounding to Binary bits, "mpfr-internally"|
||"mpfr" Sequence Generation|
||(Alternating) Binomial Sums via Rmpfr|
||Special Mathematical Functions (MPFR)|
||One-Dimensional Numerical Integration - in pure R|
||One Dimensional Root (Zero) Finding - in pure R|
||High Precisione One-Dimensional Optimization|
||Hooke-Jeeves Derivative-Free Minimization R (working for MPFR)|
Further information is available in the following vignettes:
||Rmpfr (source, pdf)|
||Acccurately Computing log(1 - exp(.)) -- Assessed by Rmpfr (source, pdf)|
MPFR (MP Floating-Point Reliable Library), http://mpfr.org/
GMP (GNU Multiple Precision library), http://gmplib.org/
and see the vignettes mentioned above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
## Using "mpfr" numbers instead of regular numbers... n1.25 <- mpfr(5, precBits = 256)/4 n1.25 ## and then "everything" just works with the desired chosen precision:hig n1.25 ^ c(1:7, 20, 30) ## fully precise; compare with print(1.25 ^ 30, digits=19) exp(n1.25) ## Show all math functions which work with "MPFR" numbers (1 exception: trigamma) getGroupMembers("Math") ## We provide *many* arithmetic, special function, and other methods: showMethods(classes = "mpfr") showMethods(classes = "mpfrArray")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.