We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 068ee69 commit 45bec81Copy full SHA for 45bec81
libm/src/math/arch/i586.rs
@@ -60,7 +60,12 @@ pub fn floor(mut x: f64) -> f64 {
60
}
61
x
62
63
-
+/// Implements the exponential functions with `x87` assembly. This relies on
64
+/// the instruction `f2xm1`, which computes `2^x - 1` (for |x| < 1). This
65
+/// transcendental instruction is documented to produce results with error
66
+/// below 1ulp (in the native double-extended precision format).
67
+/// This translates to correctly rounded results for f32, but results
68
+/// in f64 may have 1ulp error, which may depend on the hardware.
69
macro_rules! x87exp {
70
($float_ty:ident, $word_size:literal, $fn_name:ident, $load_op:literal) => {
71
pub fn $fn_name(mut x: $float_ty) -> $float_ty { unsafe {
0 commit comments