
(FPCore (x eps) :precision binary64 (/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (- (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (- (* (+ 1.0 eps) x))))) 2.0))
double code(double x, double eps) {
return (((1.0 + (1.0 / eps)) * exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * exp(-((1.0 + eps) * x)))) / 2.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (((1.0d0 + (1.0d0 / eps)) * exp(-((1.0d0 - eps) * x))) - (((1.0d0 / eps) - 1.0d0) * exp(-((1.0d0 + eps) * x)))) / 2.0d0
end function
public static double code(double x, double eps) {
return (((1.0 + (1.0 / eps)) * Math.exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * Math.exp(-((1.0 + eps) * x)))) / 2.0;
}
def code(x, eps): return (((1.0 + (1.0 / eps)) * math.exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * math.exp(-((1.0 + eps) * x)))) / 2.0
function code(x, eps) return Float64(Float64(Float64(Float64(1.0 + Float64(1.0 / eps)) * exp(Float64(-Float64(Float64(1.0 - eps) * x)))) - Float64(Float64(Float64(1.0 / eps) - 1.0) * exp(Float64(-Float64(Float64(1.0 + eps) * x))))) / 2.0) end
function tmp = code(x, eps) tmp = (((1.0 + (1.0 / eps)) * exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * exp(-((1.0 + eps) * x)))) / 2.0; end
code[x_, eps_] := N[(N[(N[(N[(1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision] * N[Exp[(-N[(N[(1.0 - eps), $MachinePrecision] * x), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(1.0 / eps), $MachinePrecision] - 1.0), $MachinePrecision] * N[Exp[(-N[(N[(1.0 + eps), $MachinePrecision] * x), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{-\left(1 - \varepsilon\right) \cdot x} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{-\left(1 + \varepsilon\right) \cdot x}}{2}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x eps) :precision binary64 (/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (- (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (- (* (+ 1.0 eps) x))))) 2.0))
double code(double x, double eps) {
return (((1.0 + (1.0 / eps)) * exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * exp(-((1.0 + eps) * x)))) / 2.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (((1.0d0 + (1.0d0 / eps)) * exp(-((1.0d0 - eps) * x))) - (((1.0d0 / eps) - 1.0d0) * exp(-((1.0d0 + eps) * x)))) / 2.0d0
end function
public static double code(double x, double eps) {
return (((1.0 + (1.0 / eps)) * Math.exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * Math.exp(-((1.0 + eps) * x)))) / 2.0;
}
def code(x, eps): return (((1.0 + (1.0 / eps)) * math.exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * math.exp(-((1.0 + eps) * x)))) / 2.0
function code(x, eps) return Float64(Float64(Float64(Float64(1.0 + Float64(1.0 / eps)) * exp(Float64(-Float64(Float64(1.0 - eps) * x)))) - Float64(Float64(Float64(1.0 / eps) - 1.0) * exp(Float64(-Float64(Float64(1.0 + eps) * x))))) / 2.0) end
function tmp = code(x, eps) tmp = (((1.0 + (1.0 / eps)) * exp(-((1.0 - eps) * x))) - (((1.0 / eps) - 1.0) * exp(-((1.0 + eps) * x)))) / 2.0; end
code[x_, eps_] := N[(N[(N[(N[(1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision] * N[Exp[(-N[(N[(1.0 - eps), $MachinePrecision] * x), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(1.0 / eps), $MachinePrecision] - 1.0), $MachinePrecision] * N[Exp[(-N[(N[(1.0 + eps), $MachinePrecision] * x), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(1 + \frac{1}{\varepsilon}\right) \cdot e^{-\left(1 - \varepsilon\right) \cdot x} - \left(\frac{1}{\varepsilon} - 1\right) \cdot e^{-\left(1 + \varepsilon\right) \cdot x}}{2}
\end{array}
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (if (<= eps_m 1e-7) (* (exp (- x)) (+ x 1.0)) (/ (+ (/ 1.0 (exp (+ x (* x eps_m)))) (exp (* x eps_m))) 2.0)))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (eps_m <= 1e-7) {
tmp = exp(-x) * (x + 1.0);
} else {
tmp = ((1.0 / exp((x + (x * eps_m)))) + exp((x * eps_m))) / 2.0;
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (eps_m <= 1d-7) then
tmp = exp(-x) * (x + 1.0d0)
else
tmp = ((1.0d0 / exp((x + (x * eps_m)))) + exp((x * eps_m))) / 2.0d0
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (eps_m <= 1e-7) {
tmp = Math.exp(-x) * (x + 1.0);
} else {
tmp = ((1.0 / Math.exp((x + (x * eps_m)))) + Math.exp((x * eps_m))) / 2.0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if eps_m <= 1e-7: tmp = math.exp(-x) * (x + 1.0) else: tmp = ((1.0 / math.exp((x + (x * eps_m)))) + math.exp((x * eps_m))) / 2.0 return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (eps_m <= 1e-7) tmp = Float64(exp(Float64(-x)) * Float64(x + 1.0)); else tmp = Float64(Float64(Float64(1.0 / exp(Float64(x + Float64(x * eps_m)))) + exp(Float64(x * eps_m))) / 2.0); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (eps_m <= 1e-7) tmp = exp(-x) * (x + 1.0); else tmp = ((1.0 / exp((x + (x * eps_m)))) + exp((x * eps_m))) / 2.0; end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[eps$95$m, 1e-7], N[(N[Exp[(-x)], $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / N[Exp[N[(x + N[(x * eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[Exp[N[(x * eps$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;eps\_m \leq 10^{-7}:\\
\;\;\;\;e^{-x} \cdot \left(x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{e^{x + x \cdot eps\_m}} + e^{x \cdot eps\_m}}{2}\\
\end{array}
\end{array}
if eps < 9.9999999999999995e-8Initial program 61.0%
Simplified53.3%
Taylor expanded in eps around 0 25.7%
associate-+r+65.2%
mul-1-neg65.2%
sub-neg65.2%
+-inverses65.2%
distribute-lft-out65.2%
distribute-rgt1-in65.2%
mul-1-neg65.2%
Simplified65.2%
Taylor expanded in eps around 0 65.2%
if 9.9999999999999995e-8 < eps Initial program 100.0%
Simplified90.4%
Taylor expanded in eps around inf 99.0%
Taylor expanded in eps around inf 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification74.7%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (/ (+ (exp (* x (+ eps_m -1.0))) (/ 1.0 (exp (+ x (* x eps_m))))) 2.0))
eps_m = fabs(eps);
double code(double x, double eps_m) {
return (exp((x * (eps_m + -1.0))) + (1.0 / exp((x + (x * eps_m))))) / 2.0;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
code = (exp((x * (eps_m + (-1.0d0)))) + (1.0d0 / exp((x + (x * eps_m))))) / 2.0d0
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
return (Math.exp((x * (eps_m + -1.0))) + (1.0 / Math.exp((x + (x * eps_m))))) / 2.0;
}
eps_m = math.fabs(eps) def code(x, eps_m): return (math.exp((x * (eps_m + -1.0))) + (1.0 / math.exp((x + (x * eps_m))))) / 2.0
eps_m = abs(eps) function code(x, eps_m) return Float64(Float64(exp(Float64(x * Float64(eps_m + -1.0))) + Float64(1.0 / exp(Float64(x + Float64(x * eps_m))))) / 2.0) end
eps_m = abs(eps); function tmp = code(x, eps_m) tmp = (exp((x * (eps_m + -1.0))) + (1.0 / exp((x + (x * eps_m))))) / 2.0; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := N[(N[(N[Exp[N[(x * N[(eps$95$m + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Exp[N[(x + N[(x * eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\frac{e^{x \cdot \left(eps\_m + -1\right)} + \frac{1}{e^{x + x \cdot eps\_m}}}{2}
\end{array}
Initial program 72.0%
Simplified65.3%
Taylor expanded in eps around inf 98.7%
Final simplification98.7%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -5e-284)
(/ (+ 1.0 (/ 1.0 (exp (+ x (* x eps_m))))) 2.0)
(if (<= x 6.5)
(/ (+ (exp (* x eps_m)) (+ 1.0 (* x (- -1.0 eps_m)))) 2.0)
(if (<= x 1.8e+77)
(* (exp (- x)) (+ x 1.0))
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -5e-284) {
tmp = (1.0 + (1.0 / exp((x + (x * eps_m))))) / 2.0;
} else if (x <= 6.5) {
tmp = (exp((x * eps_m)) + (1.0 + (x * (-1.0 - eps_m)))) / 2.0;
} else if (x <= 1.8e+77) {
tmp = exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-5d-284)) then
tmp = (1.0d0 + (1.0d0 / exp((x + (x * eps_m))))) / 2.0d0
else if (x <= 6.5d0) then
tmp = (exp((x * eps_m)) + (1.0d0 + (x * ((-1.0d0) - eps_m)))) / 2.0d0
else if (x <= 1.8d+77) then
tmp = exp(-x) * (x + 1.0d0)
else
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -5e-284) {
tmp = (1.0 + (1.0 / Math.exp((x + (x * eps_m))))) / 2.0;
} else if (x <= 6.5) {
tmp = (Math.exp((x * eps_m)) + (1.0 + (x * (-1.0 - eps_m)))) / 2.0;
} else if (x <= 1.8e+77) {
tmp = Math.exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -5e-284: tmp = (1.0 + (1.0 / math.exp((x + (x * eps_m))))) / 2.0 elif x <= 6.5: tmp = (math.exp((x * eps_m)) + (1.0 + (x * (-1.0 - eps_m)))) / 2.0 elif x <= 1.8e+77: tmp = math.exp(-x) * (x + 1.0) else: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -5e-284) tmp = Float64(Float64(1.0 + Float64(1.0 / exp(Float64(x + Float64(x * eps_m))))) / 2.0); elseif (x <= 6.5) tmp = Float64(Float64(exp(Float64(x * eps_m)) + Float64(1.0 + Float64(x * Float64(-1.0 - eps_m)))) / 2.0); elseif (x <= 1.8e+77) tmp = Float64(exp(Float64(-x)) * Float64(x + 1.0)); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -5e-284) tmp = (1.0 + (1.0 / exp((x + (x * eps_m))))) / 2.0; elseif (x <= 6.5) tmp = (exp((x * eps_m)) + (1.0 + (x * (-1.0 - eps_m)))) / 2.0; elseif (x <= 1.8e+77) tmp = exp(-x) * (x + 1.0); else tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -5e-284], N[(N[(1.0 + N[(1.0 / N[Exp[N[(x + N[(x * eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 6.5], N[(N[(N[Exp[N[(x * eps$95$m), $MachinePrecision]], $MachinePrecision] + N[(1.0 + N[(x * N[(-1.0 - eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 1.8e+77], N[(N[Exp[(-x)], $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-284}:\\
\;\;\;\;\frac{1 + \frac{1}{e^{x + x \cdot eps\_m}}}{2}\\
\mathbf{elif}\;x \leq 6.5:\\
\;\;\;\;\frac{e^{x \cdot eps\_m} + \left(1 + x \cdot \left(-1 - eps\_m\right)\right)}{2}\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+77}:\\
\;\;\;\;e^{-x} \cdot \left(x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.99999999999999973e-284Initial program 71.2%
Simplified62.3%
Taylor expanded in eps around inf 99.0%
Taylor expanded in x around 0 71.8%
if -4.99999999999999973e-284 < x < 6.5Initial program 50.3%
Simplified40.8%
Taylor expanded in eps around inf 98.4%
Taylor expanded in eps around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 83.7%
mul-1-neg83.7%
Simplified83.7%
if 6.5 < x < 1.7999999999999999e77Initial program 95.2%
Simplified95.2%
Taylor expanded in eps around 0 60.7%
associate-+r+65.5%
mul-1-neg65.5%
sub-neg65.5%
+-inverses65.5%
distribute-lft-out65.5%
distribute-rgt1-in65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in eps around 0 65.5%
if 1.7999999999999999e77 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.9%
associate-+r+30.9%
mul-1-neg30.9%
sub-neg30.9%
+-inverses30.9%
distribute-lft-out30.9%
distribute-rgt1-in30.9%
mul-1-neg30.9%
Simplified30.9%
Taylor expanded in x around inf 30.9%
rec-exp30.9%
associate-*r/30.9%
*-rgt-identity30.9%
Simplified30.9%
clear-num30.9%
metadata-eval30.9%
associate-/r/30.9%
metadata-eval30.9%
rec-exp30.9%
add-sqr-sqrt0.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod70.7%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
Taylor expanded in x around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification74.7%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -95.0)
(/ (- x) (exp x))
(if (<= x 1.45)
(+ 1.0 (* (* x x) (- (* x 0.3333333333333333) 0.5)))
(if (<= x 2e+77)
(/ x (exp x))
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -95.0) {
tmp = -x / exp(x);
} else if (x <= 1.45) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 2e+77) {
tmp = x / exp(x);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-95.0d0)) then
tmp = -x / exp(x)
else if (x <= 1.45d0) then
tmp = 1.0d0 + ((x * x) * ((x * 0.3333333333333333d0) - 0.5d0))
else if (x <= 2d+77) then
tmp = x / exp(x)
else
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -95.0) {
tmp = -x / Math.exp(x);
} else if (x <= 1.45) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 2e+77) {
tmp = x / Math.exp(x);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -95.0: tmp = -x / math.exp(x) elif x <= 1.45: tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)) elif x <= 2e+77: tmp = x / math.exp(x) else: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -95.0) tmp = Float64(Float64(-x) / exp(x)); elseif (x <= 1.45) tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(x * 0.3333333333333333) - 0.5))); elseif (x <= 2e+77) tmp = Float64(x / exp(x)); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -95.0) tmp = -x / exp(x); elseif (x <= 1.45) tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)); elseif (x <= 2e+77) tmp = x / exp(x); else tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -95.0], N[((-x) / N[Exp[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+77], N[(x / N[Exp[x], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -95:\\
\;\;\;\;\frac{-x}{e^{x}}\\
\mathbf{elif}\;x \leq 1.45:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(x \cdot 0.3333333333333333 - 0.5\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+77}:\\
\;\;\;\;\frac{x}{e^{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if x < -95Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
distribute-lft-out0.0%
distribute-rgt1-in0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
rec-exp0.0%
associate-*r/0.0%
*-rgt-identity0.0%
Simplified0.0%
frac-2neg0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
if -95 < x < 1.44999999999999996Initial program 54.1%
Simplified33.8%
Taylor expanded in eps around 0 27.4%
associate-+r+74.3%
mul-1-neg74.3%
sub-neg74.3%
+-inverses74.3%
distribute-lft-out74.3%
distribute-rgt1-in74.2%
mul-1-neg74.2%
Simplified74.2%
Taylor expanded in x around 0 74.3%
unpow274.3%
Applied egg-rr74.3%
if 1.44999999999999996 < x < 1.99999999999999997e77Initial program 95.2%
Simplified95.2%
Taylor expanded in eps around 0 60.7%
associate-+r+65.5%
mul-1-neg65.5%
sub-neg65.5%
+-inverses65.5%
distribute-lft-out65.5%
distribute-rgt1-in65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in x around inf 61.7%
rec-exp61.7%
associate-*r/61.7%
*-rgt-identity61.7%
Simplified61.7%
if 1.99999999999999997e77 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.9%
associate-+r+30.9%
mul-1-neg30.9%
sub-neg30.9%
+-inverses30.9%
distribute-lft-out30.9%
distribute-rgt1-in30.9%
mul-1-neg30.9%
Simplified30.9%
Taylor expanded in x around inf 30.9%
rec-exp30.9%
associate-*r/30.9%
*-rgt-identity30.9%
Simplified30.9%
clear-num30.9%
metadata-eval30.9%
associate-/r/30.9%
metadata-eval30.9%
rec-exp30.9%
add-sqr-sqrt0.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod70.7%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
Taylor expanded in x around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification76.2%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(let* ((t_0
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
(if (<= x -1300000.0)
t_0
(if (<= x 1.45)
(+ 1.0 (* (* x x) (- (* x 0.3333333333333333) 0.5)))
(if (<= x 5e+76) (/ x (exp x)) t_0)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
double tmp;
if (x <= -1300000.0) {
tmp = t_0;
} else if (x <= 1.45) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 5e+76) {
tmp = x / exp(x);
} else {
tmp = t_0;
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
if (x <= (-1300000.0d0)) then
tmp = t_0
else if (x <= 1.45d0) then
tmp = 1.0d0 + ((x * x) * ((x * 0.3333333333333333d0) - 0.5d0))
else if (x <= 5d+76) then
tmp = x / exp(x)
else
tmp = t_0
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
double tmp;
if (x <= -1300000.0) {
tmp = t_0;
} else if (x <= 1.45) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 5e+76) {
tmp = x / Math.exp(x);
} else {
tmp = t_0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) tmp = 0 if x <= -1300000.0: tmp = t_0 elif x <= 1.45: tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)) elif x <= 5e+76: tmp = x / math.exp(x) else: tmp = t_0 return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))) tmp = 0.0 if (x <= -1300000.0) tmp = t_0; elseif (x <= 1.45) tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(x * 0.3333333333333333) - 0.5))); elseif (x <= 5e+76) tmp = Float64(x / exp(x)); else tmp = t_0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); tmp = 0.0; if (x <= -1300000.0) tmp = t_0; elseif (x <= 1.45) tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)); elseif (x <= 5e+76) tmp = x / exp(x); else tmp = t_0; end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1300000.0], t$95$0, If[LessEqual[x, 1.45], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+76], N[(x / N[Exp[x], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{if}\;x \leq -1300000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.45:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(x \cdot 0.3333333333333333 - 0.5\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+76}:\\
\;\;\;\;\frac{x}{e^{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.3e6 or 4.99999999999999991e76 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 17.7%
associate-+r+17.7%
mul-1-neg17.7%
sub-neg17.7%
+-inverses17.7%
distribute-lft-out17.7%
distribute-rgt1-in17.7%
mul-1-neg17.7%
Simplified17.7%
Taylor expanded in x around inf 17.7%
rec-exp17.7%
associate-*r/17.7%
*-rgt-identity17.7%
Simplified17.7%
clear-num17.7%
metadata-eval17.7%
associate-/r/17.7%
metadata-eval17.7%
rec-exp17.7%
add-sqr-sqrt0.0%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod40.5%
add-sqr-sqrt41.2%
Applied egg-rr41.2%
Taylor expanded in x around 0 72.8%
*-commutative72.8%
Simplified72.8%
if -1.3e6 < x < 1.44999999999999996Initial program 54.1%
Simplified33.8%
Taylor expanded in eps around 0 27.4%
associate-+r+74.3%
mul-1-neg74.3%
sub-neg74.3%
+-inverses74.3%
distribute-lft-out74.3%
distribute-rgt1-in74.2%
mul-1-neg74.2%
Simplified74.2%
Taylor expanded in x around 0 74.3%
unpow274.3%
Applied egg-rr74.3%
if 1.44999999999999996 < x < 4.99999999999999991e76Initial program 95.2%
Simplified95.2%
Taylor expanded in eps around 0 60.7%
associate-+r+65.5%
mul-1-neg65.5%
sub-neg65.5%
+-inverses65.5%
distribute-lft-out65.5%
distribute-rgt1-in65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in x around inf 61.7%
rec-exp61.7%
associate-*r/61.7%
*-rgt-identity61.7%
Simplified61.7%
Final simplification72.8%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -3.5e-286)
(/ (+ 1.0 (/ 1.0 (exp (+ x (* x eps_m))))) 2.0)
(if (<= x 1.9e+77)
(* (exp (- x)) (+ x 1.0))
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -3.5e-286) {
tmp = (1.0 + (1.0 / exp((x + (x * eps_m))))) / 2.0;
} else if (x <= 1.9e+77) {
tmp = exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-3.5d-286)) then
tmp = (1.0d0 + (1.0d0 / exp((x + (x * eps_m))))) / 2.0d0
else if (x <= 1.9d+77) then
tmp = exp(-x) * (x + 1.0d0)
else
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -3.5e-286) {
tmp = (1.0 + (1.0 / Math.exp((x + (x * eps_m))))) / 2.0;
} else if (x <= 1.9e+77) {
tmp = Math.exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -3.5e-286: tmp = (1.0 + (1.0 / math.exp((x + (x * eps_m))))) / 2.0 elif x <= 1.9e+77: tmp = math.exp(-x) * (x + 1.0) else: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -3.5e-286) tmp = Float64(Float64(1.0 + Float64(1.0 / exp(Float64(x + Float64(x * eps_m))))) / 2.0); elseif (x <= 1.9e+77) tmp = Float64(exp(Float64(-x)) * Float64(x + 1.0)); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -3.5e-286) tmp = (1.0 + (1.0 / exp((x + (x * eps_m))))) / 2.0; elseif (x <= 1.9e+77) tmp = exp(-x) * (x + 1.0); else tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -3.5e-286], N[(N[(1.0 + N[(1.0 / N[Exp[N[(x + N[(x * eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 1.9e+77], N[(N[Exp[(-x)], $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-286}:\\
\;\;\;\;\frac{1 + \frac{1}{e^{x + x \cdot eps\_m}}}{2}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+77}:\\
\;\;\;\;e^{-x} \cdot \left(x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.49999999999999988e-286Initial program 71.2%
Simplified62.3%
Taylor expanded in eps around inf 99.0%
Taylor expanded in x around 0 71.8%
if -3.49999999999999988e-286 < x < 1.9000000000000001e77Initial program 59.5%
Simplified43.2%
Taylor expanded in eps around 0 33.7%
associate-+r+74.2%
mul-1-neg74.2%
sub-neg74.2%
+-inverses74.2%
distribute-lft-out74.2%
distribute-rgt1-in74.1%
mul-1-neg74.1%
Simplified74.1%
Taylor expanded in eps around 0 74.2%
if 1.9000000000000001e77 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.9%
associate-+r+30.9%
mul-1-neg30.9%
sub-neg30.9%
+-inverses30.9%
distribute-lft-out30.9%
distribute-rgt1-in30.9%
mul-1-neg30.9%
Simplified30.9%
Taylor expanded in x around inf 30.9%
rec-exp30.9%
associate-*r/30.9%
*-rgt-identity30.9%
Simplified30.9%
clear-num30.9%
metadata-eval30.9%
associate-/r/30.9%
metadata-eval30.9%
rec-exp30.9%
add-sqr-sqrt0.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod70.7%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
Taylor expanded in x around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification72.5%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -700.0)
(/ (- x) (exp x))
(if (<= x 1.85e+77)
(* (exp (- x)) (+ x 1.0))
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -700.0) {
tmp = -x / exp(x);
} else if (x <= 1.85e+77) {
tmp = exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-700.0d0)) then
tmp = -x / exp(x)
else if (x <= 1.85d+77) then
tmp = exp(-x) * (x + 1.0d0)
else
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -700.0) {
tmp = -x / Math.exp(x);
} else if (x <= 1.85e+77) {
tmp = Math.exp(-x) * (x + 1.0);
} else {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -700.0: tmp = -x / math.exp(x) elif x <= 1.85e+77: tmp = math.exp(-x) * (x + 1.0) else: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -700.0) tmp = Float64(Float64(-x) / exp(x)); elseif (x <= 1.85e+77) tmp = Float64(exp(Float64(-x)) * Float64(x + 1.0)); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -700.0) tmp = -x / exp(x); elseif (x <= 1.85e+77) tmp = exp(-x) * (x + 1.0); else tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -700.0], N[((-x) / N[Exp[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+77], N[(N[Exp[(-x)], $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -700:\\
\;\;\;\;\frac{-x}{e^{x}}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+77}:\\
\;\;\;\;e^{-x} \cdot \left(x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if x < -700Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
distribute-lft-out0.0%
distribute-rgt1-in0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
rec-exp0.0%
associate-*r/0.0%
*-rgt-identity0.0%
Simplified0.0%
frac-2neg0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
if -700 < x < 1.84999999999999997e77Initial program 58.8%
Simplified40.9%
Taylor expanded in eps around 0 31.3%
associate-+r+73.3%
mul-1-neg73.3%
sub-neg73.3%
+-inverses73.3%
distribute-lft-out73.3%
distribute-rgt1-in73.2%
mul-1-neg73.2%
Simplified73.2%
Taylor expanded in eps around 0 73.3%
if 1.84999999999999997e77 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.9%
associate-+r+30.9%
mul-1-neg30.9%
sub-neg30.9%
+-inverses30.9%
distribute-lft-out30.9%
distribute-rgt1-in30.9%
mul-1-neg30.9%
Simplified30.9%
Taylor expanded in x around inf 30.9%
rec-exp30.9%
associate-*r/30.9%
*-rgt-identity30.9%
Simplified30.9%
clear-num30.9%
metadata-eval30.9%
associate-/r/30.9%
metadata-eval30.9%
rec-exp30.9%
add-sqr-sqrt0.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod70.7%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
Taylor expanded in x around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification76.4%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(let* ((t_0
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
(if (<= x -12200.0)
t_0
(if (<= x 650.0)
(+ 1.0 (* (* x x) (- (* x 0.3333333333333333) 0.5)))
(if (<= x 1e+78) 0.0 t_0)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
double tmp;
if (x <= -12200.0) {
tmp = t_0;
} else if (x <= 650.0) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 1e+78) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
if (x <= (-12200.0d0)) then
tmp = t_0
else if (x <= 650.0d0) then
tmp = 1.0d0 + ((x * x) * ((x * 0.3333333333333333d0) - 0.5d0))
else if (x <= 1d+78) then
tmp = 0.0d0
else
tmp = t_0
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
double tmp;
if (x <= -12200.0) {
tmp = t_0;
} else if (x <= 650.0) {
tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5));
} else if (x <= 1e+78) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) tmp = 0 if x <= -12200.0: tmp = t_0 elif x <= 650.0: tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)) elif x <= 1e+78: tmp = 0.0 else: tmp = t_0 return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))) tmp = 0.0 if (x <= -12200.0) tmp = t_0; elseif (x <= 650.0) tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(x * 0.3333333333333333) - 0.5))); elseif (x <= 1e+78) tmp = 0.0; else tmp = t_0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); tmp = 0.0; if (x <= -12200.0) tmp = t_0; elseif (x <= 650.0) tmp = 1.0 + ((x * x) * ((x * 0.3333333333333333) - 0.5)); elseif (x <= 1e+78) tmp = 0.0; else tmp = t_0; end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -12200.0], t$95$0, If[LessEqual[x, 650.0], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+78], 0.0, t$95$0]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{if}\;x \leq -12200:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 650:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(x \cdot 0.3333333333333333 - 0.5\right)\\
\mathbf{elif}\;x \leq 10^{+78}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -12200 or 1.00000000000000001e78 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 17.7%
associate-+r+17.7%
mul-1-neg17.7%
sub-neg17.7%
+-inverses17.7%
distribute-lft-out17.7%
distribute-rgt1-in17.7%
mul-1-neg17.7%
Simplified17.7%
Taylor expanded in x around inf 17.7%
rec-exp17.7%
associate-*r/17.7%
*-rgt-identity17.7%
Simplified17.7%
clear-num17.7%
metadata-eval17.7%
associate-/r/17.7%
metadata-eval17.7%
rec-exp17.7%
add-sqr-sqrt0.0%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod40.5%
add-sqr-sqrt41.2%
Applied egg-rr41.2%
Taylor expanded in x around 0 72.8%
*-commutative72.8%
Simplified72.8%
if -12200 < x < 650Initial program 53.7%
Simplified33.6%
Taylor expanded in eps around 0 27.3%
associate-+r+74.4%
mul-1-neg74.4%
sub-neg74.4%
+-inverses74.4%
distribute-lft-out74.4%
distribute-rgt1-in74.4%
mul-1-neg74.4%
Simplified74.4%
Taylor expanded in x around 0 73.9%
unpow273.9%
Applied egg-rr73.9%
if 650 < x < 1.00000000000000001e78Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 63.7%
div-sub63.7%
mul-1-neg63.7%
rec-exp63.7%
+-inverses63.7%
metadata-eval63.7%
Simplified63.7%
Final simplification72.8%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -1.35e+154)
(* x (+ x 1.0))
(if (<= x 0.00034)
(+ 1.0 (* (* x (+ eps_m 1.0)) -0.5))
(if (<= x 7.8e+102) 0.0 (* x (+ 1.0 (* x (* x 0.5))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -1.35e+154) {
tmp = x * (x + 1.0);
} else if (x <= 0.00034) {
tmp = 1.0 + ((x * (eps_m + 1.0)) * -0.5);
} else if (x <= 7.8e+102) {
tmp = 0.0;
} else {
tmp = x * (1.0 + (x * (x * 0.5)));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-1.35d+154)) then
tmp = x * (x + 1.0d0)
else if (x <= 0.00034d0) then
tmp = 1.0d0 + ((x * (eps_m + 1.0d0)) * (-0.5d0))
else if (x <= 7.8d+102) then
tmp = 0.0d0
else
tmp = x * (1.0d0 + (x * (x * 0.5d0)))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -1.35e+154) {
tmp = x * (x + 1.0);
} else if (x <= 0.00034) {
tmp = 1.0 + ((x * (eps_m + 1.0)) * -0.5);
} else if (x <= 7.8e+102) {
tmp = 0.0;
} else {
tmp = x * (1.0 + (x * (x * 0.5)));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -1.35e+154: tmp = x * (x + 1.0) elif x <= 0.00034: tmp = 1.0 + ((x * (eps_m + 1.0)) * -0.5) elif x <= 7.8e+102: tmp = 0.0 else: tmp = x * (1.0 + (x * (x * 0.5))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -1.35e+154) tmp = Float64(x * Float64(x + 1.0)); elseif (x <= 0.00034) tmp = Float64(1.0 + Float64(Float64(x * Float64(eps_m + 1.0)) * -0.5)); elseif (x <= 7.8e+102) tmp = 0.0; else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.5)))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -1.35e+154) tmp = x * (x + 1.0); elseif (x <= 0.00034) tmp = 1.0 + ((x * (eps_m + 1.0)) * -0.5); elseif (x <= 7.8e+102) tmp = 0.0; else tmp = x * (1.0 + (x * (x * 0.5))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -1.35e+154], N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.00034], N[(1.0 + N[(N[(x * N[(eps$95$m + 1.0), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+102], 0.0, N[(x * N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \left(x + 1\right)\\
\mathbf{elif}\;x \leq 0.00034:\\
\;\;\;\;1 + \left(x \cdot \left(eps\_m + 1\right)\right) \cdot -0.5\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+102}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if x < -1.35000000000000003e154Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
distribute-lft-out0.0%
distribute-rgt1-in0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
rec-exp0.0%
associate-*r/0.0%
*-rgt-identity0.0%
Simplified0.0%
clear-num0.0%
metadata-eval0.0%
associate-/r/0.0%
metadata-eval0.0%
rec-exp0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
Simplified100.0%
if -1.35000000000000003e154 < x < 3.4e-4Initial program 58.9%
Simplified48.9%
Taylor expanded in eps around inf 98.6%
Taylor expanded in x around 0 80.7%
Taylor expanded in x around 0 65.1%
if 3.4e-4 < x < 7.7999999999999997e102Initial program 96.5%
Simplified96.6%
Taylor expanded in eps around 0 50.8%
div-sub50.8%
mul-1-neg50.8%
rec-exp50.8%
+-inverses50.8%
metadata-eval50.8%
Simplified50.8%
if 7.7999999999999997e102 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.4%
associate-+r+30.4%
mul-1-neg30.4%
sub-neg30.4%
+-inverses30.4%
distribute-lft-out30.4%
distribute-rgt1-in30.4%
mul-1-neg30.4%
Simplified30.4%
Taylor expanded in x around inf 30.4%
rec-exp30.4%
associate-*r/30.4%
*-rgt-identity30.4%
Simplified30.4%
Taylor expanded in x around 0 71.2%
Taylor expanded in x around inf 71.2%
*-commutative71.2%
Simplified71.2%
Final simplification66.6%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -1.65)
(* x (+ x 1.0))
(if (<= x 560.0)
1.0
(if (<= x 7.1e+102) 0.0 (* x (+ 1.0 (* x (* x 0.5))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -1.65) {
tmp = x * (x + 1.0);
} else if (x <= 560.0) {
tmp = 1.0;
} else if (x <= 7.1e+102) {
tmp = 0.0;
} else {
tmp = x * (1.0 + (x * (x * 0.5)));
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= (-1.65d0)) then
tmp = x * (x + 1.0d0)
else if (x <= 560.0d0) then
tmp = 1.0d0
else if (x <= 7.1d+102) then
tmp = 0.0d0
else
tmp = x * (1.0d0 + (x * (x * 0.5d0)))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= -1.65) {
tmp = x * (x + 1.0);
} else if (x <= 560.0) {
tmp = 1.0;
} else if (x <= 7.1e+102) {
tmp = 0.0;
} else {
tmp = x * (1.0 + (x * (x * 0.5)));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -1.65: tmp = x * (x + 1.0) elif x <= 560.0: tmp = 1.0 elif x <= 7.1e+102: tmp = 0.0 else: tmp = x * (1.0 + (x * (x * 0.5))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -1.65) tmp = Float64(x * Float64(x + 1.0)); elseif (x <= 560.0) tmp = 1.0; elseif (x <= 7.1e+102) tmp = 0.0; else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.5)))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -1.65) tmp = x * (x + 1.0); elseif (x <= 560.0) tmp = 1.0; elseif (x <= 7.1e+102) tmp = 0.0; else tmp = x * (1.0 + (x * (x * 0.5))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -1.65], N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 560.0], 1.0, If[LessEqual[x, 7.1e+102], 0.0, N[(x * N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65:\\
\;\;\;\;x \cdot \left(x + 1\right)\\
\mathbf{elif}\;x \leq 560:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+102}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if x < -1.6499999999999999Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
distribute-lft-out0.0%
distribute-rgt1-in0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
rec-exp0.0%
associate-*r/0.0%
*-rgt-identity0.0%
Simplified0.0%
clear-num0.0%
metadata-eval0.0%
associate-/r/0.0%
metadata-eval0.0%
rec-exp0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
Taylor expanded in x around 0 46.2%
+-commutative46.2%
Simplified46.2%
if -1.6499999999999999 < x < 560Initial program 53.7%
Simplified42.6%
Taylor expanded in eps around inf 97.9%
Taylor expanded in x around 0 86.2%
Taylor expanded in x around 0 73.6%
if 560 < x < 7.0999999999999998e102Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 56.7%
div-sub56.7%
mul-1-neg56.7%
rec-exp56.7%
+-inverses56.7%
metadata-eval56.7%
Simplified56.7%
if 7.0999999999999998e102 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 30.4%
associate-+r+30.4%
mul-1-neg30.4%
sub-neg30.4%
+-inverses30.4%
distribute-lft-out30.4%
distribute-rgt1-in30.4%
mul-1-neg30.4%
Simplified30.4%
Taylor expanded in x around inf 30.4%
rec-exp30.4%
associate-*r/30.4%
*-rgt-identity30.4%
Simplified30.4%
Taylor expanded in x around 0 71.2%
Taylor expanded in x around inf 71.2%
*-commutative71.2%
Simplified71.2%
Final simplification67.8%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (let* ((t_0 (* x (+ x 1.0)))) (if (<= x -1.6) t_0 (if (<= x 650.0) 1.0 (if (<= x 1.8e+154) 0.0 t_0)))))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -1.6) {
tmp = t_0;
} else if (x <= 650.0) {
tmp = 1.0;
} else if (x <= 1.8e+154) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: t_0
real(8) :: tmp
t_0 = x * (x + 1.0d0)
if (x <= (-1.6d0)) then
tmp = t_0
else if (x <= 650.0d0) then
tmp = 1.0d0
else if (x <= 1.8d+154) then
tmp = 0.0d0
else
tmp = t_0
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -1.6) {
tmp = t_0;
} else if (x <= 650.0) {
tmp = 1.0;
} else if (x <= 1.8e+154) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = x * (x + 1.0) tmp = 0 if x <= -1.6: tmp = t_0 elif x <= 650.0: tmp = 1.0 elif x <= 1.8e+154: tmp = 0.0 else: tmp = t_0 return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(x * Float64(x + 1.0)) tmp = 0.0 if (x <= -1.6) tmp = t_0; elseif (x <= 650.0) tmp = 1.0; elseif (x <= 1.8e+154) tmp = 0.0; else tmp = t_0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = x * (x + 1.0); tmp = 0.0; if (x <= -1.6) tmp = t_0; elseif (x <= 650.0) tmp = 1.0; elseif (x <= 1.8e+154) tmp = 0.0; else tmp = t_0; end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6], t$95$0, If[LessEqual[x, 650.0], 1.0, If[LessEqual[x, 1.8e+154], 0.0, t$95$0]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 1\right)\\
\mathbf{if}\;x \leq -1.6:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 650:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.6000000000000001 or 1.8e154 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 14.4%
associate-+r+14.4%
mul-1-neg14.4%
sub-neg14.4%
+-inverses14.4%
distribute-lft-out14.4%
distribute-rgt1-in14.4%
mul-1-neg14.4%
Simplified14.4%
Taylor expanded in x around inf 14.4%
rec-exp14.4%
associate-*r/14.4%
*-rgt-identity14.4%
Simplified14.4%
clear-num14.4%
metadata-eval14.4%
associate-/r/14.4%
metadata-eval14.4%
rec-exp14.4%
add-sqr-sqrt0.0%
sqrt-unprod32.5%
sqr-neg32.5%
sqrt-unprod32.5%
add-sqr-sqrt33.4%
Applied egg-rr33.4%
Taylor expanded in x around 0 57.4%
+-commutative57.4%
Simplified57.4%
if -1.6000000000000001 < x < 650Initial program 53.7%
Simplified42.6%
Taylor expanded in eps around inf 97.9%
Taylor expanded in x around 0 86.2%
Taylor expanded in x around 0 73.6%
if 650 < x < 1.8e154Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 48.0%
div-sub48.0%
mul-1-neg48.0%
rec-exp48.0%
+-inverses48.0%
metadata-eval48.0%
Simplified48.0%
Final simplification65.9%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (if (<= x 550.0) 1.0 0.0))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 550.0) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
real(8) :: tmp
if (x <= 550.0d0) then
tmp = 1.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double tmp;
if (x <= 550.0) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 550.0: tmp = 1.0 else: tmp = 0.0 return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 550.0) tmp = 1.0; else tmp = 0.0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 550.0) tmp = 1.0; else tmp = 0.0; end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 550.0], 1.0, 0.0]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 550:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 550Initial program 62.3%
Simplified53.2%
Taylor expanded in eps around inf 98.3%
Taylor expanded in x around 0 78.5%
Taylor expanded in x around 0 60.6%
if 550 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 40.3%
div-sub40.3%
mul-1-neg40.3%
rec-exp40.3%
+-inverses40.3%
metadata-eval40.3%
Simplified40.3%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 0.0)
eps_m = fabs(eps);
double code(double x, double eps_m) {
return 0.0;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
code = 0.0d0
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
return 0.0;
}
eps_m = math.fabs(eps) def code(x, eps_m): return 0.0
eps_m = abs(eps) function code(x, eps_m) return 0.0 end
eps_m = abs(eps); function tmp = code(x, eps_m) tmp = 0.0; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := 0.0
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
0
\end{array}
Initial program 72.0%
Simplified65.3%
Taylor expanded in eps around 0 12.0%
div-sub12.0%
mul-1-neg12.0%
rec-exp12.0%
+-inverses12.3%
metadata-eval12.3%
Simplified12.3%
herbie shell --seed 2024143
(FPCore (x eps)
:name "NMSE Section 6.1 mentioned, A"
:precision binary64
(/ (- (* (+ 1.0 (/ 1.0 eps)) (exp (- (* (- 1.0 eps) x)))) (* (- (/ 1.0 eps) 1.0) (exp (- (* (+ 1.0 eps) x))))) 2.0))