File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -752,9 +752,9 @@ impl f32 {
752752 /// let f = std::f32::consts::FRAC_PI_4;
753753 ///
754754 /// // asin(sin(pi/2))
755- /// let abs_difference = (f.sin().asin() - std::f32::consts::FRAC_PI_2 ).abs();
755+ /// let abs_difference = (f.sin().asin() - f ).abs();
756756 ///
757- /// assert!(abs_difference <= 1e-1 );
757+ /// assert!(abs_difference <= 1e-6 );
758758 /// ```
759759 #[ doc( alias = "arcsin" ) ]
760760 #[ rustc_allow_incoherent_impl]
@@ -1095,7 +1095,7 @@ impl f32 {
10951095 ///
10961096 /// let abs_difference = (f - x).abs();
10971097 ///
1098- /// assert!(abs_difference <= 1e-6 );
1098+ /// assert!(abs_difference <= 1e-5 );
10991099 /// ```
11001100 #[ doc( alias = "arccosh" ) ]
11011101 #[ rustc_allow_incoherent_impl]
Original file line number Diff line number Diff line change @@ -752,9 +752,9 @@ impl f64 {
752752 /// let f = std::f64::consts::FRAC_PI_4;
753753 ///
754754 /// // asin(sin(pi/2))
755- /// let abs_difference = (f.sin().asin() - std::f64::consts::FRAC_PI_2 ).abs();
755+ /// let abs_difference = (f.sin().asin() - f ).abs();
756756 ///
757- /// assert!(abs_difference < 1e-7 );
757+ /// assert!(abs_difference < 1e-14 );
758758 /// ```
759759 #[ doc( alias = "arcsin" ) ]
760760 #[ rustc_allow_incoherent_impl]
You can’t perform that action at this time.
0 commit comments