Function alloy_eips::eip4844::fake_exponential

source ·
pub const fn fake_exponential(
    factor: u128,
    numerator: u128,
    denominator: u128,
) -> u128
Expand description

Approximates factor * e ** (numerator / denominator) using Taylor expansion.

This is used to calculate the blob price.

See also the EIP-4844 helpers (fake_exponential).

§Panics

This function panics if denominator is zero.