1\name{Rmpfr-package}
2\alias{Rmpfr-package}
3\alias{Rmpfr}
4\docType{package}
5\title{R MPFR - Multiple Precision Floating-Point Reliable}
6\description{
7  Rmpfr provides S4 classes and methods for arithmetic
8  including transcendental ("special") functions for arbitrary
9  precision floating point numbers, here often called \dQuote{mpfr -
10    numbers}.  To this end, it interfaces to the LGPL'ed MPFR (Multiple
11  Precision Floating-Point Reliable) Library which itself is based on
12  the GMP (GNU Multiple Precision) Library.
13}
14\details{
15%  The DESCRIPTION file:
16  \packageDESCRIPTION{Rmpfr}
17  \packageIndices{Rmpfr}
18
19The following (help pages) index does not really mention that we provide \emph{many}
20methods for mathematical functions, including
21\code{\link{gamma}}, \code{\link{digamma}}, etc, namely, all of \R's (S4)
22\code{Math} group (with the only exception of \code{\link{trigamma}}),
23see the list in the examples.
24Additionally also \code{\link{pnorm}}, the \dQuote{error function},
25and more, see the list in \code{\link{zeta}}, and
26further note the first vignette (below).
27
28%% MM: could try more systematically
29
30\bold{\emph{Partial} index}:
31\tabular{ll}{
32  \code{\link{mpfr}}              \tab  Create "mpfr" Numbers (Objects) \cr
33  \code{\link{mpfrArray}}         \tab  Construct "mpfrArray" almost as by \code{\link{array}()} \cr
34  \code{\link{mpfr-class}}        \tab  Class "mpfr" of Multiple Precision Floating Point Numbers \cr
35  \code{\link{mpfrMatrix-class}}  \tab  Classes "mpfrMatrix" and "mpfrArray" \cr
36				  \tab \cr
37  \code{\link{Bernoulli}}         \tab  Bernoulli Numbers in Arbitrary Precision \cr
38  \code{\link{Bessel_mpfr}}       \tab  Bessel functions of Integer Order in multiple precisions \cr
39  \code{\link{c.mpfr}}            \tab  MPFR Number Utilities \cr
40  \code{\link{cbind}}             \tab  "mpfr" \code{...} - Methods for Functions cbind(), rbind() \cr
41  \code{\link{chooseMpfr}}        \tab  Binomial Coefficients and Pochhammer Symbol aka \cr
42				  \tab  Rising Factorial \cr
43  \code{\link{factorialMpfr}}     \tab  Factorial 'n!'  in Arbitrary Precision \cr
44  \code{\link{formatMpfr}}        \tab  Formatting MPFR (multiprecision) Numbers \cr
45  \code{\link{getPrec}}           \tab  Rmpfr - Utilities for Precision Setting, Printing, etc \cr
46  \code{\link{roundMpfr}}         \tab  Rounding to Binary bits, "mpfr-internally" \cr
47  \code{\link{seqMpfr}}           \tab  "mpfr" Sequence Generation \cr
48  \code{\link{sumBinomMpfr}}      \tab  (Alternating) Binomial Sums via Rmpfr \cr
49  \code{\link{zeta}}              \tab  Special Mathematical Functions (MPFR) \cr
50				  \tab \cr
51  \code{\link{integrateR}}        \tab  One-Dimensional Numerical Integration - in pure R \cr
52  \code{\link{unirootR}}          \tab  One Dimensional Root (Zero) Finding - in pure R \cr
53  \code{\link{optimizeR}}         \tab  High Precisione One-Dimensional Optimization \cr
54  \code{\link{hjkMpfr}}           \tab  Hooke-Jeeves Derivative-Free Minimization R (working for MPFR) \cr
55}
56
57Further information is available in the following vignettes:
58\tabular{ll}{
59  \code{Rmpfr-pkg} \tab Arbitrarily Accurate Computation with R: The 'Rmpfr' package (source, pdf)\cr
60
61  \code{log1mexp-note} \tab Acccurately Computing log(1 - exp(.)) -- Assessed by Rmpfr (source, pdf)\cr
62}
63}%- end{details}
64\author{Martin Maechler}
65\references{
66  MPFR (MP Floating-Point Reliable Library),
67  \url{https://www.mpfr.org/}% or http://mpfr.org/  (unfortunately the % http*s* needs the "www")
68
69  GMP (GNU Multiple Precision library),
70  \url{https://gmplib.org/}
71
72  and see the vignettes mentioned above.
73}
74\seealso{
75  The \R package \code{\link[gmp:biginteger]{gmp}} for big integer and
76  rational numbers (\code{\link[gmp]{bigrational}}) on which \pkg{Rmpfr}
77  now depends.
78}
79\examples{
80## Using  "mpfr" numbers instead of regular numbers...
81n1.25 <- mpfr(5, precBits = 256)/4
82n1.25
83
84## and then "everything" just works with the desired chosen precision:hig
85n1.25 ^ c(1:7, 20, 30) ## fully precise; compare with
86print(1.25 ^ 30, digits=19)
87
88exp(n1.25)
89
90## Show all math functions which work with "MPFR" numbers (1 exception: trigamma)
91getGroupMembers("Math")
92
93## We provide *many* arithmetic, special function, and other methods:
94showMethods(classes = "mpfr")
95showMethods(classes = "mpfrArray")
96}
97\keyword{package}
98