File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1036,13 +1036,13 @@ impl f16 {
1036
1036
/// # #[cfg(not(bootstrap))]
1037
1037
/// # #[cfg(reliable_f16_math)] {
1038
1038
///
1039
- /// let x = 1e-8_f16 ;
1039
+ /// let x = 1e-4_f16 ;
1040
1040
///
1041
1041
/// // for very small x, e^x is approximately 1 + x + x^2 / 2
1042
1042
/// let approx = x + x * x / 2.0;
1043
1043
/// let abs_difference = (x.exp_m1() - approx).abs();
1044
1044
///
1045
- /// assert!(abs_difference < 1e-10 );
1045
+ /// assert!(abs_difference < 1e-4 );
1046
1046
/// # }
1047
1047
/// ```
1048
1048
#[ inline]
@@ -1070,13 +1070,13 @@ impl f16 {
1070
1070
/// # #[cfg(not(bootstrap))]
1071
1071
/// # #[cfg(reliable_f16_math)] {
1072
1072
///
1073
- /// let x = 1e-8_f16 ;
1073
+ /// let x = 1e-4_f16 ;
1074
1074
///
1075
1075
/// // for very small x, ln(1 + x) is approximately x - x^2 / 2
1076
1076
/// let approx = x - x * x / 2.0;
1077
1077
/// let abs_difference = (x.ln_1p() - approx).abs();
1078
1078
///
1079
- /// assert!(abs_difference < 1e-10 );
1079
+ /// assert!(abs_difference < 1e-4 );
1080
1080
/// # }
1081
1081
/// ```
1082
1082
#[ inline]
@@ -1282,7 +1282,7 @@ impl f16 {
1282
1282
///
1283
1283
/// let abs_difference = (f - e).abs();
1284
1284
///
1285
- /// assert!(abs_difference <= 1e-5 );
1285
+ /// assert!(abs_difference <= 0.01 );
1286
1286
/// # }
1287
1287
/// ```
1288
1288
#[ inline]
You can’t perform that action at this time.
0 commit comments