| division {cmna} | R Documentation |
Algorithms for divisions
Description
Algorithms for division that provide a quotient and remainder.
Usage
naivediv(m, n)
longdiv(m, n)
Arguments
m |
the dividend |
n |
the divisor |
Details
The naivediv divides m by n by using repeated
division. The longdiv function uses the long division
algorithm in binary.
Value
the quotient and remainder as a list
See Also
Other algebra:
bilinear(),
cubicspline(),
fibonacci(),
horner(),
isPrime(),
linterp(),
nthroot(),
polyinterp(),
pwiselinterp(),
quadratic()
Examples
a <- floor(runif(1, 1, 1000))
b <- floor(runif(1, 1, 100))
naivediv(a, b)
longdiv(a, b)
[Package cmna version 1.0.5 Index]