softdevteam / yksom

Other
8 stars 6 forks source link

We need to check BigInt::to_f64() for infinity explicitly. #196

Closed ltratt closed 3 years ago

ltratt commented 3 years ago

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.

ltratt commented 3 years ago

bors try

bors[bot] commented 3 years ago

try

Build succeeded:

ptersilie commented 3 years ago

Please squash.

ltratt commented 3 years ago

Squashed.

ptersilie commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Timed out.

ltratt commented 3 years ago

@ptersilie I think we need to retry bors.

ptersilie commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build succeeded: