Skip to main content

Module exp

Module exp 

Source

Re-exportsยง

use alloy_primitives::I256; ๐Ÿ”’
use alloy_primitives::Sign; ๐Ÿ”’
use alloy_primitives::U256; ๐Ÿ”’
use yansi::Paint; ๐Ÿ”’

Functionsยง

format_int_exp
Formats a U256 number to string, adding an exponential notation hint.
format_uint_exp
Formats a U256 number to string, adding an exponential notation hint if it is larger than 10_000, with a precision of 4 figures, and trimming the trailing zeros.
to_exp_notation
Returns the number expressed as a string in exponential notation with the given precision (number of significant figures), optionally removing trailing zeros from the mantissa.