Skip to main content

reduce_to_i64

Function reduce_to_i64 

Source
pub fn reduce_to_i64(num: i128, denom: i128) -> Result<(i64, i64), AmountError>
Expand description

Reduces num/denom by their gcd and narrows it to i64; denom must be positive. Fails with Overflow when either part does not fit, or the numerator is i64::MIN.