Crate bobcat_maths

Crate bobcat_maths 

Source

Macros§

u

Structs§

I
U
UValueParser

Enums§

UFromStrErr

Functions§

checked_add
checked_add_opt
checked_div
checked_div_opt
checked_mul
checked_mul_opt
checked_pow
checked_rooti
Rooti iterative method based on the 9lives implementation. Using this operation is the equivalent of pow(x, 1/n).
checked_sub
checked_sub_opt
const_wrapping_div
modd
mul_div
Muldiv that’s used in practice by Uniswap and other on-chain dapps. Middling in gas costs.
mul_div_round_up
mul_mod
saturating_add
saturating_div
saturating_mul
saturating_sub
widening_mul
widening_mul_div
Widening then truncate mul div that’s cheaper in codesize that’s safe for cold operations. The most expensive in gas costs.
widening_mul_div_round_up
wrapping_add
wrapping_div
wrapping_mul
wrapping_mul_b
wrapping_mul_const
wrapping_mul_const_b
wrapping_pow
wrapping_sub