Closed

Description
Example:
extern crate num;
use num::{BigInt, BigRational, ToPrimitive};
fn main() {
let n = BigInt::from(-2);
let n = n.pow(4001);
println!("{:?}", n.to_f64());
let r = BigRational::from(n);
println!("{:?}", r.to_f64());
}
Result:
None
Some(-inf)
I was expecting some minus infinite and got none. A workaround is to convert to BigRational
but it is expensive, a clone is required.
Metadata
Metadata
Assignees
Labels
No labels