Skip to content

Commit 26bc5e8

Browse files
committed
format code
1 parent 5a6695e commit 26bc5e8

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/real/arithmetic.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,9 +4135,7 @@ impl Real {
41354135
let squared = base.clone().powi(int * BigInt::from(2_u8))?;
41364136
let one = Rational::one();
41374137
crate::trace_dispatch!("real", "tanh", "integer-log-collapse");
4138-
return Ok(Self::new(
4139-
(squared.clone() - one.clone()) / (squared + one),
4140-
));
4138+
return Ok(Self::new((squared.clone() - one.clone()) / (squared + one)));
41414139
}
41424140
crate::trace_dispatch!("real", "tanh", "generic-exp-identity");
41434141
let positive = self.clone().exp()?;

src/real/tests.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,9 +1953,7 @@ mod tests {
19531953
let right = [Real::pi(), Real::e()];
19541954
let expected = &left[1] * &right[1];
19551955
let actual = Real::dot2_refs([&left[0], &left[1]], [&right[0], &right[1]]);
1956-
assert!(
1957-
(actual.to_f64_approx().unwrap() - expected.to_f64_approx().unwrap()).abs() < 1e-12
1958-
)
1956+
assert!((actual.to_f64_approx().unwrap() - expected.to_f64_approx().unwrap()).abs() < 1e-12)
19591957
}
19601958

19611959
#[test]
@@ -1969,8 +1967,7 @@ mod tests {
19691967
let zero_minus = Computable::zero().atan2(Computable::one().negate());
19701968
assert_eq!(zero_minus.approx(-30), Computable::pi().approx(-30));
19711969
let plus_y = Computable::one().atan2(Computable::zero());
1972-
let half_pi = Computable::pi()
1973-
.multiply(Computable::one().add(Computable::one()).inverse());
1970+
let half_pi = Computable::pi().multiply(Computable::one().add(Computable::one()).inverse());
19741971
assert_eq!(plus_y.approx(-30), half_pi.approx(-30));
19751972
}
19761973

0 commit comments

Comments
 (0)