Other SOMs that I've tried error (whether deliberately or not) when a big integer is too big to be represented as a floating point number. The BigInt::to_f64() function used to return None in such cases but now they always return Some::(f64::INFINITY) (see https://github.com/rust-num/num-bigint/pull/163). This PR handles that explicitly.
On the plus side, we can simplify our code a little bit; on the downside we'll also probably be a tiny bit slower in the common case.
Other SOMs that I've tried error (whether deliberately or not) when a big integer is too big to be represented as a floating point number. The
BigInt::to_f64()
function used to returnNone
in such cases but now they always returnSome::(f64::INFINITY)
(see https://github.com/rust-num/num-bigint/pull/163). This PR handles that explicitly.On the plus side, we can simplify our code a little bit; on the downside we'll also probably be a tiny bit slower in the common case.