04. Logarithms {VeryLargeIntegers} | R Documentation |
Integer Logarithms for vli Objects
Description
Computation of integer logarithms and their remainders for objects of class vli.
Functions log
, log10
and loge
return respectively the integer generalized logarithm, the integer base-10 logarithm and the integer natural logarithm of the given values. Functions logrem
and log10rem
returns the corresponding remainder.
Usage
## S3 method for class 'vli'
log10(x)
log10rem(x)
## Default S3 method:
log10rem(x)
## S3 method for class 'numeric'
log10rem(x)
## S3 method for class 'vli'
log10rem(x)
## S3 method for class 'vli'
log(x, base)
logrem(x, base)
## Default S3 method:
logrem(x, base)
## S3 method for class 'numeric'
logrem(x, base)
## S3 method for class 'vli'
logrem(x, base)
loge(x)
## Default S3 method:
loge(x)
## S3 method for class 'numeric'
loge(x)
## S3 method for class 'vli'
loge(x)
Arguments
x |
object of class vli or 32 bits integer |
base |
base of the logarithm; object of class vli or 32 bits integer |
Value
object of class vli
Author(s)
Javier Leiva Cuadrado
Examples
x <- as.vli("3873899469432")
log(x, base = 5)
logrem(x, base = 5)
( 5^log(x, base = 5) ) + logrem(x, base = 5) == x
x <- as.vli("149234629386497858748773210293261249785")
log10(x)
[Package VeryLargeIntegers version 0.2.1 Index]