matmult | R Documentation |
Matrix multiplication for numeric/float matrices.
## S4 method for signature 'float32,float32' x %*% y ## S4 method for signature 'float32,matrix' x %*% y ## S4 method for signature 'matrix,float32' x %*% y
x, y |
Numeric/float matrices. |
If a numeric matrix is multiplied against a float matrix, then if the "numeric" matrix is integers, the integers are promoted to floats. Otherwise, the float matrix is promoted to doubles.
A matrix of the same type as the highest precision input.
library(float) s1 = flrunif(5, 5) s2 = flrunif(5, 2) x = matrix(1:25, 5) s1 %*% s2 # float storage.mode(x) # integer x %*% s2 # float storage.mode(x) = "double" x %*% s2 # double
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.