powered by
Algorithms for division that provide a quotient and remainder.
naivediv(m, n)longdiv(m, n)
longdiv(m, n)
the dividend
the divisor
the quotient and remainder as a list
The naivediv divides m by n by using repeated division. The longdiv function uses the long division algorithm in binary.
naivediv
m
n
longdiv
Other algebra: bilinear, cubicspline, fibonacci, horner, isPrime, linterp, nthroot, polyinterp, pwiselinterp, quadratic
bilinear
cubicspline
fibonacci
horner
isPrime
linterp
nthroot
polyinterp
pwiselinterp
quadratic
# NOT RUN { a <- floor(runif(1, 1, 1000)) b <- floor(runif(1, 1, 100)) naivediv(a, b) longdiv(a, b) # }
Run the code above in your browser using DataLab