Expand description
Contains an implementation of the bisection method for computing roots, but working with integers only.
Functionsยง
- bisect_
floor - Finds some integer
left <= n < right
such thatf(n) <= 0
andf(n + 1) > 0
, given thatf(left) <= 0
andf(right) > 0
. - find_
root_ floor - Given a function
f
withlim_{x -> -inf} f(x) = -inf
andlim_{x -> inf} f(x) = inf
, finds some integern
such thatf(n) <= 0
andf(n + 1) > 0
. - root_
floor - Computes the largest integer
x
such thatx^root <= n
, wheren
is a positive integer.