Module math

Source
Expand description

Helper functions for common mathematical operations.

Structs§

PowerOfTwo
Represents an integral power-of-two as an exponent.

Functions§

abs
Return the absolute value of the floating point number.
closest_power_of_two
Get closest power of two greater than the given number.
log10
Compute the base 10 logarithm of f.
log_base_two
Get log base 2 of a number.
log_base_two_u64
Log base 2 of 64 bit unsigned integers.