Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

alexandria_math

Fully qualified path: alexandria_math

Modules

aliquot_sum
armstrong_number
bitmap
collatz_sequence
const_pow
decimal
ed25519
extended_euclidean_algorithm
fast_power
fast_root
fibonacci
gcd_of_n_numbers
i257
is_power_of_two
is_prime
karatsuba
keccak256
lcm_of_n_numbers
mod_arithmetics
opt_math
perfect_number
pow_macro
ripemd160
sha256
sha512
trigonometry
u512_arithmetics
wad_ray_mathProvides functions to perform calculations with Wad and Ray units @dev Provides mul and div function for wads (decimal numbers with 18 digits of precision) and…
zellers_congruenceZeller’s congruence is an algorithm devised by Christian Zeller in the 19th century to calculate the day of the week for any Julian or Gregorian calendar date….

Free functions

powRaise a number to a power. O(log n) time complexity….
count_digits_of_baseFunction to count the number of digits in a number….

Traits

BitShift
BitRotateRotate the bits of an unsigned integer of type T
WrappingMath

Impls


Re-exports:

BoundedA trait defining minimum and maximum bounds for numeric types. This trait only supports types that can have constant values.
OverflowingMulPerforms multiplication with a flag for overflow….
WideMulA trait for types that can be multiplied together to produce a wider type. This trait enables multiplication operations where the result type has double…
WrappingAddPerforms addition that wraps around on overflow….
WrappingMulPerforms multiplication that wraps around on overflow….
WrappingSubPerforms subtraction that wraps around on overflow….