Function sp_arithmetic::helpers_128bit::multiply_by_rational[][src]

pub fn multiply_by_rational(
    a: u128,
    b: u128,
    c: u128
) -> Result<u128, &'static str>

Safely and accurately compute a * b / c. The approach is:

Invariant: c must be greater than or equal to 1.