Skip to content

Commit 6016691

Browse files
committed
Adapted unit tests for complex exp() to take advantage of the cis() function.
1 parent 65db97b commit 6016691

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,10 +1813,10 @@ mod test {
18131813
assert!(close_naninf(_1_nani.exp(), _nan_nani));
18141814
assert!(close_naninf(_neg1_nani.exp(), _nan_nani));
18151815
assert!(close_naninf(_inf_0i.exp(), _inf_0i));
1816-
assert!(close_naninf(_neginf_1i.exp(), 0.0 * Complex64::new(1.0.cos(), 1.0.sin())));
1817-
assert!(close_naninf(_neginf_neg1i.exp(), 0.0 * Complex64::new((-1.0).cos(), (-1.0).sin())));
1818-
assert!(close_naninf(_inf_1i.exp(), f64::INFINITY * Complex64::new(1.0.cos(), 1.0.sin())));
1819-
assert!(close_naninf(_inf_neg1i.exp(), f64::INFINITY * Complex64::new((-1.0).cos(), (-1.0).sin())));
1816+
assert!(close_naninf(_neginf_1i.exp(), 0.0 * Complex::cis(1.0)));
1817+
assert!(close_naninf(_neginf_neg1i.exp(), 0.0 * Complex::cis(-1.0)));
1818+
assert!(close_naninf(_inf_1i.exp(), f64::INFINITY * Complex::cis(1.0)));
1819+
assert!(close_naninf(_inf_neg1i.exp(), f64::INFINITY * Complex::cis(-1.0)));
18201820
assert!(close_naninf(_neginf_infi.exp(), _0_0i)); // Note: ±0±0i: signs of zeros are unspecified
18211821
assert!(close_naninf(_inf_infi.exp(), _inf_nani)); // Note: ±∞+NaN*i: sign of the real part is unspecified
18221822
assert!(close_naninf(_neginf_nani.exp(), _0_0i)); // Note: ±0±0i: signs of zeros are unspecified

0 commit comments

Comments
 (0)