Module malachite_q::arithmetic
source · [−]Expand description
Traits for arithmetic.
Modules
Implementations of Approximate
and
ApproximateAssign
, traits for approximating a
Rational
by a Rational
with a bounded denominator.
Implementations of Ceiling
and
CeilingAssign
, traits for taking
the ceiling of a number.
Implementations of Floor
and
FloorAssign
, traits for taking the
floor of a number.
Implementations of IsPowerOf2
, a trait
for determining whether a number is an integer power of 2.
Implementations of traits for taking the base-$b$ logarithm of a number.
Implementations of traits for taking the base-2 logarithm of a number.
Implementations of traits for taking the base-$2^k$ logarithm of a number.
Implementations of NextPowerOf2
and
NextPowerOf2Assign
, traits for
getting the next-highest power of 2.
Implementations of PowerOf2
, a trait for
computing a power of 2.
Implementations of Reciprocal
and
ReciprocalAssign
, traits for
computing the reciprocal of a number.
Implementations of CheckedRoot
, a
trait for computing the root of a number, if the number is a perfect power.
Implementations of
RoundToMultiple
and
RoundToMultipleAssign
,
traits for rounding a number to a multiple of another number.
Implementations of
RoundToMultipleOfPowerOf2
and
RoundToMultipleOfPowerOf2Assign
,
traits for rounding a number to a multiple of a power of 2.
Functions for finding the simplest (lowest-denominator) Rational
in an
interval.
Implementations of CheckedSqrt
, a
trait for computing the root of a number, if the number is a perfect square.
Implementations of Square
and
SquareAssign
, traits for squaring a
number.
Various traits for performing arithmetic operations on numbers.