This commit is contained in:
Fabian Boehm 2024-05-26 10:50:45 +02:00
parent 52d1806e1f
commit b9b7dc5f6c
2 changed files with 5 additions and 4 deletions

View file

@ -25,9 +25,7 @@
// This version has been altered and ported to C++, then to Rust, for inclusion in fish.
use std::{
f64::{
consts::{E, PI, TAU},
},
f64::consts::{E, PI, TAU},
fmt::Debug,
ops::{BitAnd, BitOr, BitXor},
};

View file

@ -363,7 +363,10 @@ mod tests {
// The mantissa and exponent can cancel each other out!
assert_eq!(parse(&format!("0x1{:0<512}p-2000", "")), 2.0f64.powi(48));
assert_eq!(parse(&format!("-0x1{:0<512}p-2000", "")), -(2.0f64.powi(48)));
assert_eq!(
parse(&format!("-0x1{:0<512}p-2000", "")),
-(2.0f64.powi(48))
);
}
#[test]