Learn R Programming

Rmpfr (version 0.8-2)

matmult: (MPFR) Matrix (Vector) Multiplication

Description

Matrix / vector multiplication of mpfr (and “simple” numeric) matrices and vectors.

matmult (x,y, fPrec = 2) or crossprod(x,y, fPrec = 2) use higher precision in underlying computations.

Usage

matmult(x, y, ...)

Arguments

x, y

numeric or '>mpfrMatrix-classed R objects, i.e. semantically numeric matrices or vectors.

arguments passed to the hidden underlying .matmult.R() work horse which is also underlying the %*%, crossprod(), and tcrossprod() methods, see the '>mpfrMatrix class documentation:

fPrec

a multiplication factor, a positive number determining the number of bits precBits used for the underlying multiplication and summation arithmetic. The default is fPrec = 1. Setting fPrec = 2 doubles the precision which has been recommended, e.g., by John Nash.

precBits

the number of bits used for the underlying multiplication and summation arithmetic; by default precBits = fPrec * max(getPrec(x), getPrec(y)) which typically uses the same accuracy as regular mpfr-arithmetic would use.

Value

a (base R) matrix or '>mpfrMatrix, depending on the classes of x and y.

See Also

%*%, crossprod, tcrossprod.

Examples

Run this code
# NOT RUN {
<!-- %% ## The function is currently defined as -->
# }
# NOT RUN {
<!-- %% function (x, y, ...) -->
# }
# NOT RUN {
<!-- %% .matmult.R(x, y, op = 0L, ...) -->
# }
# NOT RUN {
## FIXME: add example

## 1)  matmult()  <-->  %*%

## 2)  crossprod() , tcrossprod()  %% <--> ./mpfrMatrix-class.Rd  examples  (!)
# }

Run the code above in your browser using DataLab