Skip to main content

Module math

Module math 

Source
Expand description

Mathematical utilities for blockchain value conversion.

This module provides functions for converting large integer types (U256, I256) used in blockchain applications to floating-point values, accounting for token decimal places and precision requirements.

Functions§

convert_i256_to_f64
Convert an alloy’s I256 value to f64, accounting for token decimals.
convert_u256_to_f64
Convert an alloy’s U256 value to f64, accounting for token decimals.