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_math | Provides 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_congruence | Zeller’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
| pow | Raise a number to a power. O(log n) time complexity…. |
| count_digits_of_base | Function to count the number of digits in a number…. |
Traits
| BitShift | — |
| BitRotate | Rotate the bits of an unsigned integer of type T |
| WrappingMath | — |
Impls
| U8BitShift | — |
| U16BitShift | — |
| U32BitShift | — |
| U64BitShift | — |
| U128BitShift | — |
| U256BitShift | — |
| U8BitRotate | — |
| U16BitRotate | — |
| U32BitRotate | — |
| U64BitRotate | — |
| U128BitRotate | — |
| U256BitRotate | — |
Re-exports:
| Bounded | A trait defining minimum and maximum bounds for numeric types. This trait only supports types that can have constant values. |
| OverflowingMul | Performs multiplication with a flag for overflow…. |
| WideMul | A trait for types that can be multiplied together to produce a wider type. This trait enables multiplication operations where the result type has double… |
| WrappingAdd | Performs addition that wraps around on overflow…. |
| WrappingMul | Performs multiplication that wraps around on overflow…. |
| WrappingSub | Performs subtraction that wraps around on overflow…. |