Skip to content

Commit 2d5549c

Browse files
consistent docs for f*.rs functions
1 parent 3008073 commit 2d5549c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/std/src/num/f128.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,10 @@ impl f128 {
467467
/// # #[cfg(not(miri))]
468468
/// # #[cfg(target_has_reliable_f128_math)] {
469469
///
470-
/// let f = std::f128::consts::FRAC_PI_2;
470+
/// let f = std::f128::consts::FRAC_PI_4;
471471
///
472472
/// // asin(sin(pi/2))
473-
/// let abs_difference = (f.sin().asin() - std::f128::consts::FRAC_PI_2).abs();
473+
/// let abs_difference = (f.sin().asin() - f).abs();
474474
///
475475
/// assert!(abs_difference <= f128::EPSILON);
476476
/// # }

library/std/src/num/f16.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,10 @@ impl f16 {
432432
/// # #[cfg(not(miri))]
433433
/// # #[cfg(target_has_reliable_f16_math)] {
434434
///
435-
/// let f = std::f16::consts::FRAC_PI_2;
435+
/// let f = std::f16::consts::FRAC_PI_4;
436436
///
437437
/// // asin(sin(pi/2))
438-
/// let abs_difference = (f.sin().asin() - std::f16::consts::FRAC_PI_2).abs();
438+
/// let abs_difference = (f.sin().asin() - f).abs();
439439
///
440440
/// assert!(abs_difference <= f16::EPSILON);
441441
/// # }

0 commit comments

Comments
 (0)