Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cfba491

Browse files
fix
1 parent 64a99db commit cfba491

File tree

1 file changed

+2
-2
lines changed
  • library/std/tests/floats

1 file changed

+2
-2
lines changed

‎library/std/tests/floats/f32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ fn test_log() {
7979
let nan: f32 = f32::NAN;
8080
let inf: f32 = f32::INFINITY;
8181
let neg_inf: f32 = f32::NEG_INFINITY;
82-
assert_approx_eq!(10.0f32.log(10.0), 1.0);
83-
assert_approx_eq!(2.3f32.log(3.5), 0.664858);
82+
assert_approx_eq!(10.0f32.log(10.0), 1.0,APPROX_DELTA);
83+
assert_approx_eq!(2.3f32.log(3.5), 0.664858,APPROX_DELTA);
8484
assert_approx_eq!(1.0f32.exp().log(1.0f32.exp()), 1.0, APPROX_DELTA);
8585
assert!(1.0f32.log(1.0).is_nan());
8686
assert!(1.0f32.log(-13.9).is_nan());

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /