03. Roots | R Documentation |
Computation of integer roots and their remainders of vli (Very Large Integers) objects. Functions sqrt
and rootk
returns respectively the integer square root and the integer k-th root of the given value. Functions sqrtrem
and rootkrem
returns the corresponding remainder.
## S3 method for class 'vli'
sqrt(x)
sqrtrem(x)
## Default S3 method:
sqrtrem(x)
## S3 method for class 'numeric'
sqrtrem(x)
## S3 method for class 'vli'
sqrtrem(x)
rootk(x, k)
## Default S3 method:
rootk(x, k)
## S3 method for class 'numeric'
rootk(x, k)
## S3 method for class 'vli'
rootk(x, k)
rootkrem(x, k)
## Default S3 method:
rootkrem(x, k)
## S3 method for class 'numeric'
rootkrem(x, k)
## S3 method for class 'vli'
rootkrem(x, k)
x |
base of the root; object of class vli or 32 bits integer |
k |
index of the root; object of class vli or 32 bits integer |
object of class vli
Javier Leiva Cuadrado
x <- as.vli("4124135")
sqrt(x)
sqrtrem(x)
sqrt(x)^2 + sqrtrem(x) == x
## Not run:
rootk(as.vli("1492346293864978561249785"), 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.