
(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 15 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 0.00037) (* (+ x 1.0) (exp (- 0.0 x))) (* 0.5 (+ (exp (* x (- -1.0 eps_m))) (exp (* x eps_m))))))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (eps_m <= 0.00037) {
tmp = (x + 1.0) * exp((0.0 - x));
} else {
tmp = 0.5 * (exp((x * (-1.0 - eps_m))) + exp((x * eps_m)));
}
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 <= 0.00037d0) then
tmp = (x + 1.0d0) * exp((0.0d0 - x))
else
tmp = 0.5d0 * (exp((x * ((-1.0d0) - eps_m))) + exp((x * eps_m)))
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 <= 0.00037) {
tmp = (x + 1.0) * Math.exp((0.0 - x));
} else {
tmp = 0.5 * (Math.exp((x * (-1.0 - eps_m))) + Math.exp((x * eps_m)));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if eps_m <= 0.00037: tmp = (x + 1.0) * math.exp((0.0 - x)) else: tmp = 0.5 * (math.exp((x * (-1.0 - eps_m))) + math.exp((x * eps_m))) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (eps_m <= 0.00037) tmp = Float64(Float64(x + 1.0) * exp(Float64(0.0 - x))); else tmp = Float64(0.5 * Float64(exp(Float64(x * Float64(-1.0 - eps_m))) + exp(Float64(x * eps_m)))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (eps_m <= 0.00037) tmp = (x + 1.0) * exp((0.0 - x)); else tmp = 0.5 * (exp((x * (-1.0 - eps_m))) + exp((x * eps_m))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[eps$95$m, 0.00037], N[(N[(x + 1.0), $MachinePrecision] * N[Exp[N[(0.0 - x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[Exp[N[(x * N[(-1.0 - eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Exp[N[(x * eps$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;eps\_m \leq 0.00037:\\
\;\;\;\;\left(x + 1\right) \cdot e^{0 - x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(e^{x \cdot \left(-1 - eps\_m\right)} + e^{x \cdot eps\_m}\right)\\
\end{array}
\end{array}
if eps < 3.6999999999999999e-4Initial program 58.2%
Simplified58.2%
Taylor expanded in eps around 0
distribute-lft-outN/A
distribute-lft-outN/A
distribute-rgt-out--N/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6478.9%
Simplified78.9%
if 3.6999999999999999e-4 < eps Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around inf
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in eps around inf
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification84.3%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (* 0.5 (+ (exp (* x (+ eps_m -1.0))) (exp (* x (- -1.0 eps_m))))))
eps_m = fabs(eps);
double code(double x, double eps_m) {
return 0.5 * (exp((x * (eps_m + -1.0))) + exp((x * (-1.0 - eps_m))));
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
code = 0.5d0 * (exp((x * (eps_m + (-1.0d0)))) + exp((x * ((-1.0d0) - eps_m))))
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
return 0.5 * (Math.exp((x * (eps_m + -1.0))) + Math.exp((x * (-1.0 - eps_m))));
}
eps_m = math.fabs(eps) def code(x, eps_m): return 0.5 * (math.exp((x * (eps_m + -1.0))) + math.exp((x * (-1.0 - eps_m))))
eps_m = abs(eps) function code(x, eps_m) return Float64(0.5 * Float64(exp(Float64(x * Float64(eps_m + -1.0))) + exp(Float64(x * Float64(-1.0 - eps_m))))) end
eps_m = abs(eps); function tmp = code(x, eps_m) tmp = 0.5 * (exp((x * (eps_m + -1.0))) + exp((x * (-1.0 - eps_m)))); end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := N[(0.5 * N[(N[Exp[N[(x * N[(eps$95$m + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Exp[N[(x * N[(-1.0 - eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
0.5 \cdot \left(e^{x \cdot \left(eps\_m + -1\right)} + e^{x \cdot \left(-1 - eps\_m\right)}\right)
\end{array}
Initial program 69.0%
Simplified69.0%
Taylor expanded in eps around inf
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.9%
Simplified98.9%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(let* ((t_0 (+ 0.5 (/ 0.5 eps_m))))
(if (<= eps_m 0.00037)
(* (+ x 1.0) (exp (- 0.0 x)))
(-
(+
0.5
(+
(/ 0.5 eps_m)
(*
x
(+
(* (+ eps_m -1.0) t_0)
(* 0.5 (* (+ eps_m -1.0) (* (* x (+ eps_m -1.0)) t_0)))))))
(* (exp (* x (- -1.0 eps_m))) (+ (/ 0.5 eps_m) -0.5))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = 0.5 + (0.5 / eps_m);
double tmp;
if (eps_m <= 0.00037) {
tmp = (x + 1.0) * exp((0.0 - x));
} else {
tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) - (exp((x * (-1.0 - eps_m))) * ((0.5 / eps_m) + -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) :: t_0
real(8) :: tmp
t_0 = 0.5d0 + (0.5d0 / eps_m)
if (eps_m <= 0.00037d0) then
tmp = (x + 1.0d0) * exp((0.0d0 - x))
else
tmp = (0.5d0 + ((0.5d0 / eps_m) + (x * (((eps_m + (-1.0d0)) * t_0) + (0.5d0 * ((eps_m + (-1.0d0)) * ((x * (eps_m + (-1.0d0))) * t_0))))))) - (exp((x * ((-1.0d0) - eps_m))) * ((0.5d0 / eps_m) + (-0.5d0)))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = 0.5 + (0.5 / eps_m);
double tmp;
if (eps_m <= 0.00037) {
tmp = (x + 1.0) * Math.exp((0.0 - x));
} else {
tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) - (Math.exp((x * (-1.0 - eps_m))) * ((0.5 / eps_m) + -0.5));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = 0.5 + (0.5 / eps_m) tmp = 0 if eps_m <= 0.00037: tmp = (x + 1.0) * math.exp((0.0 - x)) else: tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) - (math.exp((x * (-1.0 - eps_m))) * ((0.5 / eps_m) + -0.5)) return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(0.5 + Float64(0.5 / eps_m)) tmp = 0.0 if (eps_m <= 0.00037) tmp = Float64(Float64(x + 1.0) * exp(Float64(0.0 - x))); else tmp = Float64(Float64(0.5 + Float64(Float64(0.5 / eps_m) + Float64(x * Float64(Float64(Float64(eps_m + -1.0) * t_0) + Float64(0.5 * Float64(Float64(eps_m + -1.0) * Float64(Float64(x * Float64(eps_m + -1.0)) * t_0))))))) - Float64(exp(Float64(x * Float64(-1.0 - eps_m))) * Float64(Float64(0.5 / eps_m) + -0.5))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = 0.5 + (0.5 / eps_m); tmp = 0.0; if (eps_m <= 0.00037) tmp = (x + 1.0) * exp((0.0 - x)); else tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) - (exp((x * (-1.0 - eps_m))) * ((0.5 / eps_m) + -0.5)); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eps$95$m, 0.00037], N[(N[(x + 1.0), $MachinePrecision] * N[Exp[N[(0.0 - x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(N[(0.5 / eps$95$m), $MachinePrecision] + N[(x * N[(N[(N[(eps$95$m + -1.0), $MachinePrecision] * t$95$0), $MachinePrecision] + N[(0.5 * N[(N[(eps$95$m + -1.0), $MachinePrecision] * N[(N[(x * N[(eps$95$m + -1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Exp[N[(x * N[(-1.0 - eps$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := 0.5 + \frac{0.5}{eps\_m}\\
\mathbf{if}\;eps\_m \leq 0.00037:\\
\;\;\;\;\left(x + 1\right) \cdot e^{0 - x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \left(\frac{0.5}{eps\_m} + x \cdot \left(\left(eps\_m + -1\right) \cdot t\_0 + 0.5 \cdot \left(\left(eps\_m + -1\right) \cdot \left(\left(x \cdot \left(eps\_m + -1\right)\right) \cdot t\_0\right)\right)\right)\right)\right) - e^{x \cdot \left(-1 - eps\_m\right)} \cdot \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if eps < 3.6999999999999999e-4Initial program 58.2%
Simplified58.2%
Taylor expanded in eps around 0
distribute-lft-outN/A
distribute-lft-outN/A
distribute-rgt-out--N/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6478.9%
Simplified78.9%
if 3.6999999999999999e-4 < eps Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified91.3%
Final simplification82.1%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(let* ((t_0 (+ 0.5 (/ 0.5 eps_m))))
(if (<= eps_m 7.8e+57)
(exp (- 0.0 x))
(+
(+
0.5
(+
(/ 0.5 eps_m)
(*
x
(+
(* (+ eps_m -1.0) t_0)
(* 0.5 (* (+ eps_m -1.0) (* (* x (+ eps_m -1.0)) t_0)))))))
(*
(+ (/ 0.5 eps_m) -0.5)
(+
-1.0
(*
x
(+
(+ eps_m 1.0)
(* (- -1.0 eps_m) (* (* 0.5 x) (+ eps_m 1.0)))))))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = 0.5 + (0.5 / eps_m);
double tmp;
if (eps_m <= 7.8e+57) {
tmp = exp((0.0 - x));
} else {
tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) + (((0.5 / eps_m) + -0.5) * (-1.0 + (x * ((eps_m + 1.0) + ((-1.0 - eps_m) * ((0.5 * x) * (eps_m + 1.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 = 0.5d0 + (0.5d0 / eps_m)
if (eps_m <= 7.8d+57) then
tmp = exp((0.0d0 - x))
else
tmp = (0.5d0 + ((0.5d0 / eps_m) + (x * (((eps_m + (-1.0d0)) * t_0) + (0.5d0 * ((eps_m + (-1.0d0)) * ((x * (eps_m + (-1.0d0))) * t_0))))))) + (((0.5d0 / eps_m) + (-0.5d0)) * ((-1.0d0) + (x * ((eps_m + 1.0d0) + (((-1.0d0) - eps_m) * ((0.5d0 * x) * (eps_m + 1.0d0)))))))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = 0.5 + (0.5 / eps_m);
double tmp;
if (eps_m <= 7.8e+57) {
tmp = Math.exp((0.0 - x));
} else {
tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) + (((0.5 / eps_m) + -0.5) * (-1.0 + (x * ((eps_m + 1.0) + ((-1.0 - eps_m) * ((0.5 * x) * (eps_m + 1.0)))))));
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = 0.5 + (0.5 / eps_m) tmp = 0 if eps_m <= 7.8e+57: tmp = math.exp((0.0 - x)) else: tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) + (((0.5 / eps_m) + -0.5) * (-1.0 + (x * ((eps_m + 1.0) + ((-1.0 - eps_m) * ((0.5 * x) * (eps_m + 1.0))))))) return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(0.5 + Float64(0.5 / eps_m)) tmp = 0.0 if (eps_m <= 7.8e+57) tmp = exp(Float64(0.0 - x)); else tmp = Float64(Float64(0.5 + Float64(Float64(0.5 / eps_m) + Float64(x * Float64(Float64(Float64(eps_m + -1.0) * t_0) + Float64(0.5 * Float64(Float64(eps_m + -1.0) * Float64(Float64(x * Float64(eps_m + -1.0)) * t_0))))))) + Float64(Float64(Float64(0.5 / eps_m) + -0.5) * Float64(-1.0 + Float64(x * Float64(Float64(eps_m + 1.0) + Float64(Float64(-1.0 - eps_m) * Float64(Float64(0.5 * x) * Float64(eps_m + 1.0)))))))); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = 0.5 + (0.5 / eps_m); tmp = 0.0; if (eps_m <= 7.8e+57) tmp = exp((0.0 - x)); else tmp = (0.5 + ((0.5 / eps_m) + (x * (((eps_m + -1.0) * t_0) + (0.5 * ((eps_m + -1.0) * ((x * (eps_m + -1.0)) * t_0))))))) + (((0.5 / eps_m) + -0.5) * (-1.0 + (x * ((eps_m + 1.0) + ((-1.0 - eps_m) * ((0.5 * x) * (eps_m + 1.0))))))); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eps$95$m, 7.8e+57], N[Exp[N[(0.0 - x), $MachinePrecision]], $MachinePrecision], N[(N[(0.5 + N[(N[(0.5 / eps$95$m), $MachinePrecision] + N[(x * N[(N[(N[(eps$95$m + -1.0), $MachinePrecision] * t$95$0), $MachinePrecision] + N[(0.5 * N[(N[(eps$95$m + -1.0), $MachinePrecision] * N[(N[(x * N[(eps$95$m + -1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision] * N[(-1.0 + N[(x * N[(N[(eps$95$m + 1.0), $MachinePrecision] + N[(N[(-1.0 - eps$95$m), $MachinePrecision] * N[(N[(0.5 * x), $MachinePrecision] * N[(eps$95$m + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := 0.5 + \frac{0.5}{eps\_m}\\
\mathbf{if}\;eps\_m \leq 7.8 \cdot 10^{+57}:\\
\;\;\;\;e^{0 - x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \left(\frac{0.5}{eps\_m} + x \cdot \left(\left(eps\_m + -1\right) \cdot t\_0 + 0.5 \cdot \left(\left(eps\_m + -1\right) \cdot \left(\left(x \cdot \left(eps\_m + -1\right)\right) \cdot t\_0\right)\right)\right)\right)\right) + \left(\frac{0.5}{eps\_m} + -0.5\right) \cdot \left(-1 + x \cdot \left(\left(eps\_m + 1\right) + \left(-1 - eps\_m\right) \cdot \left(\left(0.5 \cdot x\right) \cdot \left(eps\_m + 1\right)\right)\right)\right)\\
\end{array}
\end{array}
if eps < 7.79999999999999937e57Initial program 60.5%
Simplified60.5%
Taylor expanded in eps around inf
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6498.6%
Simplified98.6%
Taylor expanded in eps around 0
exp-lowering-exp.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6487.1%
Simplified87.1%
sub0-negN/A
neg-lowering-neg.f6487.1%
Applied egg-rr87.1%
if 7.79999999999999937e57 < eps Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified89.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f6484.4%
Simplified84.4%
Final simplification86.5%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -1.8e-132)
(+ 1.0 (* x (* (* -0.08333333333333333 (* eps_m (* eps_m eps_m))) (* x x))))
(if (<= x 1.5)
(+ 1.0 (* eps_m (* x (* eps_m (* x (+ 0.5 (* x -0.3333333333333333)))))))
(if (<= x 3.4e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (+ 0.5 (/ 0.5 eps_m)) (+ (/ 0.5 eps_m) -0.5))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -1.8e-132) {
tmp = 1.0 + (x * ((-0.08333333333333333 * (eps_m * (eps_m * eps_m))) * (x * x)));
} else if (x <= 1.5) {
tmp = 1.0 + (eps_m * (x * (eps_m * (x * (0.5 + (x * -0.3333333333333333))))));
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -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.8d-132)) then
tmp = 1.0d0 + (x * (((-0.08333333333333333d0) * (eps_m * (eps_m * eps_m))) * (x * x)))
else if (x <= 1.5d0) then
tmp = 1.0d0 + (eps_m * (x * (eps_m * (x * (0.5d0 + (x * (-0.3333333333333333d0)))))))
else if (x <= 3.4d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 + (0.5d0 / eps_m)) - ((0.5d0 / eps_m) + (-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.8e-132) {
tmp = 1.0 + (x * ((-0.08333333333333333 * (eps_m * (eps_m * eps_m))) * (x * x)));
} else if (x <= 1.5) {
tmp = 1.0 + (eps_m * (x * (eps_m * (x * (0.5 + (x * -0.3333333333333333))))));
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -1.8e-132: tmp = 1.0 + (x * ((-0.08333333333333333 * (eps_m * (eps_m * eps_m))) * (x * x))) elif x <= 1.5: tmp = 1.0 + (eps_m * (x * (eps_m * (x * (0.5 + (x * -0.3333333333333333)))))) elif x <= 3.4e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -1.8e-132) tmp = Float64(1.0 + Float64(x * Float64(Float64(-0.08333333333333333 * Float64(eps_m * Float64(eps_m * eps_m))) * Float64(x * x)))); elseif (x <= 1.5) tmp = Float64(1.0 + Float64(eps_m * Float64(x * Float64(eps_m * Float64(x * Float64(0.5 + Float64(x * -0.3333333333333333))))))); elseif (x <= 3.4e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 + Float64(0.5 / eps_m)) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -1.8e-132) tmp = 1.0 + (x * ((-0.08333333333333333 * (eps_m * (eps_m * eps_m))) * (x * x))); elseif (x <= 1.5) tmp = 1.0 + (eps_m * (x * (eps_m * (x * (0.5 + (x * -0.3333333333333333)))))); elseif (x <= 3.4e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -1.8e-132], N[(1.0 + N[(x * N[(N[(-0.08333333333333333 * N[(eps$95$m * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5], N[(1.0 + N[(eps$95$m * N[(x * N[(eps$95$m * N[(x * N[(0.5 + N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-132}:\\
\;\;\;\;1 + x \cdot \left(\left(-0.08333333333333333 \cdot \left(eps\_m \cdot \left(eps\_m \cdot eps\_m\right)\right)\right) \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;x \leq 1.5:\\
\;\;\;\;1 + eps\_m \cdot \left(x \cdot \left(eps\_m \cdot \left(x \cdot \left(0.5 + x \cdot -0.3333333333333333\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \frac{0.5}{eps\_m}\right) - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < -1.80000000000000004e-132Initial program 78.6%
Simplified78.6%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified75.8%
Taylor expanded in x around 0
Simplified47.2%
Taylor expanded in eps around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.4%
Simplified57.4%
if -1.80000000000000004e-132 < x < 1.5Initial program 44.0%
Simplified44.0%
Taylor expanded in x around 0
Simplified68.5%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.6%
Simplified88.6%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6489.2%
Applied egg-rr89.2%
if 1.5 < x < 3.4000000000000001e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 3.4000000000000001e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification74.4%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x -1.95e-44)
(* (* (* eps_m eps_m) -0.3333333333333333) (* x (* x x)))
(if (<= x 0.06)
1.0
(if (<= x 3.4e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (/ 0.5 eps_m) (+ (/ 0.5 eps_m) -0.5))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= -1.95e-44) {
tmp = ((eps_m * eps_m) * -0.3333333333333333) * (x * (x * x));
} else if (x <= 0.06) {
tmp = 1.0;
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -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.95d-44)) then
tmp = ((eps_m * eps_m) * (-0.3333333333333333d0)) * (x * (x * x))
else if (x <= 0.06d0) then
tmp = 1.0d0
else if (x <= 3.4d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 / eps_m) - ((0.5d0 / eps_m) + (-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.95e-44) {
tmp = ((eps_m * eps_m) * -0.3333333333333333) * (x * (x * x));
} else if (x <= 0.06) {
tmp = 1.0;
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= -1.95e-44: tmp = ((eps_m * eps_m) * -0.3333333333333333) * (x * (x * x)) elif x <= 0.06: tmp = 1.0 elif x <= 3.4e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= -1.95e-44) tmp = Float64(Float64(Float64(eps_m * eps_m) * -0.3333333333333333) * Float64(x * Float64(x * x))); elseif (x <= 0.06) tmp = 1.0; elseif (x <= 3.4e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 / eps_m) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= -1.95e-44) tmp = ((eps_m * eps_m) * -0.3333333333333333) * (x * (x * x)); elseif (x <= 0.06) tmp = 1.0; elseif (x <= 3.4e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, -1.95e-44], N[(N[(N[(eps$95$m * eps$95$m), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.06], 1.0, If[LessEqual[x, 3.4e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / eps$95$m), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{-44}:\\
\;\;\;\;\left(\left(eps\_m \cdot eps\_m\right) \cdot -0.3333333333333333\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;x \leq 0.06:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{eps\_m} - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < -1.9500000000000001e-44Initial program 88.6%
Simplified88.6%
Taylor expanded in x around 0
Simplified31.3%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6490.2%
Simplified90.2%
Taylor expanded in x around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.3%
Simplified81.3%
if -1.9500000000000001e-44 < x < 0.059999999999999998Initial program 44.6%
Simplified44.6%
Taylor expanded in x around 0
Simplified83.4%
if 0.059999999999999998 < x < 3.4000000000000001e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 3.4000000000000001e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Taylor expanded in eps around 0
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification78.2%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(let* ((t_0 (* x (* 0.25 (* x (* eps_m eps_m))))))
(if (<= x -4.4e-44)
t_0
(if (<= x 0.021)
1.0
(if (<= x 2.6e+115) t_0 (- (/ 0.5 eps_m) (+ (/ 0.5 eps_m) -0.5)))))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = x * (0.25 * (x * (eps_m * eps_m)));
double tmp;
if (x <= -4.4e-44) {
tmp = t_0;
} else if (x <= 0.021) {
tmp = 1.0;
} else if (x <= 2.6e+115) {
tmp = t_0;
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -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) :: t_0
real(8) :: tmp
t_0 = x * (0.25d0 * (x * (eps_m * eps_m)))
if (x <= (-4.4d-44)) then
tmp = t_0
else if (x <= 0.021d0) then
tmp = 1.0d0
else if (x <= 2.6d+115) then
tmp = t_0
else
tmp = (0.5d0 / eps_m) - ((0.5d0 / eps_m) + (-0.5d0))
end if
code = tmp
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
double t_0 = x * (0.25 * (x * (eps_m * eps_m)));
double tmp;
if (x <= -4.4e-44) {
tmp = t_0;
} else if (x <= 0.021) {
tmp = 1.0;
} else if (x <= 2.6e+115) {
tmp = t_0;
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = x * (0.25 * (x * (eps_m * eps_m))) tmp = 0 if x <= -4.4e-44: tmp = t_0 elif x <= 0.021: tmp = 1.0 elif x <= 2.6e+115: tmp = t_0 else: tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))) tmp = 0.0 if (x <= -4.4e-44) tmp = t_0; elseif (x <= 0.021) tmp = 1.0; elseif (x <= 2.6e+115) tmp = t_0; else tmp = Float64(Float64(0.5 / eps_m) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = x * (0.25 * (x * (eps_m * eps_m))); tmp = 0.0; if (x <= -4.4e-44) tmp = t_0; elseif (x <= 0.021) tmp = 1.0; elseif (x <= 2.6e+115) tmp = t_0; else tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision]
code[x_, eps$95$m_] := Block[{t$95$0 = N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e-44], t$95$0, If[LessEqual[x, 0.021], 1.0, If[LessEqual[x, 2.6e+115], t$95$0, N[(N[(0.5 / eps$95$m), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-44}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 0.021:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+115}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{eps\_m} - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < -4.40000000000000024e-44 or 0.0210000000000000013 < x < 2.6e115Initial program 93.1%
Simplified93.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified71.0%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.8%
Simplified73.8%
if -4.40000000000000024e-44 < x < 0.0210000000000000013Initial program 44.6%
Simplified44.6%
Taylor expanded in x around 0
Simplified83.4%
if 2.6e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Taylor expanded in eps around 0
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification77.9%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x 3.0)
(+ 1.0 (* x (* eps_m (* eps_m (* x (+ 0.5 (* x -0.16666666666666666)))))))
(if (<= x 1.66e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (+ 0.5 (/ 0.5 eps_m)) (+ (/ 0.5 eps_m) -0.5)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 3.0) {
tmp = 1.0 + (x * (eps_m * (eps_m * (x * (0.5 + (x * -0.16666666666666666))))));
} else if (x <= 1.66e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -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 <= 3.0d0) then
tmp = 1.0d0 + (x * (eps_m * (eps_m * (x * (0.5d0 + (x * (-0.16666666666666666d0)))))))
else if (x <= 1.66d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 + (0.5d0 / eps_m)) - ((0.5d0 / eps_m) + (-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 <= 3.0) {
tmp = 1.0 + (x * (eps_m * (eps_m * (x * (0.5 + (x * -0.16666666666666666))))));
} else if (x <= 1.66e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 3.0: tmp = 1.0 + (x * (eps_m * (eps_m * (x * (0.5 + (x * -0.16666666666666666)))))) elif x <= 1.66e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 3.0) tmp = Float64(1.0 + Float64(x * Float64(eps_m * Float64(eps_m * Float64(x * Float64(0.5 + Float64(x * -0.16666666666666666))))))); elseif (x <= 1.66e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 + Float64(0.5 / eps_m)) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 3.0) tmp = 1.0 + (x * (eps_m * (eps_m * (x * (0.5 + (x * -0.16666666666666666)))))); elseif (x <= 1.66e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 3.0], N[(1.0 + N[(x * N[(eps$95$m * N[(eps$95$m * N[(x * N[(0.5 + N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.66e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3:\\
\;\;\;\;1 + x \cdot \left(eps\_m \cdot \left(eps\_m \cdot \left(x \cdot \left(0.5 + x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.66 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \frac{0.5}{eps\_m}\right) - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < 3Initial program 56.8%
Simplified56.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified51.8%
Taylor expanded in x around 0
Simplified55.4%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.5%
Simplified65.5%
Taylor expanded in eps around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.9%
Simplified89.9%
if 3 < x < 1.66e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 1.66e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification83.3%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x 1.5)
(+ 1.0 (* x (* (* eps_m eps_m) (* x (+ 0.5 (* x -0.3333333333333333))))))
(if (<= x 2.1e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (+ 0.5 (/ 0.5 eps_m)) (+ (/ 0.5 eps_m) -0.5)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 1.5) {
tmp = 1.0 + (x * ((eps_m * eps_m) * (x * (0.5 + (x * -0.3333333333333333)))));
} else if (x <= 2.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -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.5d0) then
tmp = 1.0d0 + (x * ((eps_m * eps_m) * (x * (0.5d0 + (x * (-0.3333333333333333d0))))))
else if (x <= 2.1d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 + (0.5d0 / eps_m)) - ((0.5d0 / eps_m) + (-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.5) {
tmp = 1.0 + (x * ((eps_m * eps_m) * (x * (0.5 + (x * -0.3333333333333333)))));
} else if (x <= 2.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 1.5: tmp = 1.0 + (x * ((eps_m * eps_m) * (x * (0.5 + (x * -0.3333333333333333))))) elif x <= 2.1e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 1.5) tmp = Float64(1.0 + Float64(x * Float64(Float64(eps_m * eps_m) * Float64(x * Float64(0.5 + Float64(x * -0.3333333333333333)))))); elseif (x <= 2.1e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 + Float64(0.5 / eps_m)) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 1.5) tmp = 1.0 + (x * ((eps_m * eps_m) * (x * (0.5 + (x * -0.3333333333333333))))); elseif (x <= 2.1e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 1.5], N[(1.0 + N[(x * N[(N[(eps$95$m * eps$95$m), $MachinePrecision] * N[(x * N[(0.5 + N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5:\\
\;\;\;\;1 + x \cdot \left(\left(eps\_m \cdot eps\_m\right) \cdot \left(x \cdot \left(0.5 + x \cdot -0.3333333333333333\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \frac{0.5}{eps\_m}\right) - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < 1.5Initial program 56.8%
Simplified56.8%
Taylor expanded in x around 0
Simplified57.9%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.5%
Simplified88.5%
if 1.5 < x < 2.10000000000000003e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 2.10000000000000003e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification82.3%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x 300.0)
(+ 1.0 (* x (* (* 0.5 x) (* eps_m eps_m))))
(if (<= x 2.1e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (+ 0.5 (/ 0.5 eps_m)) (+ (/ 0.5 eps_m) -0.5)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 300.0) {
tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m)));
} else if (x <= 2.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -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 <= 300.0d0) then
tmp = 1.0d0 + (x * ((0.5d0 * x) * (eps_m * eps_m)))
else if (x <= 2.1d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 + (0.5d0 / eps_m)) - ((0.5d0 / eps_m) + (-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 <= 300.0) {
tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m)));
} else if (x <= 2.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 300.0: tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m))) elif x <= 2.1e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 300.0) tmp = Float64(1.0 + Float64(x * Float64(Float64(0.5 * x) * Float64(eps_m * eps_m)))); elseif (x <= 2.1e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 + Float64(0.5 / eps_m)) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 300.0) tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m))); elseif (x <= 2.1e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 + (0.5 / eps_m)) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 300.0], N[(1.0 + N[(x * N[(N[(0.5 * x), $MachinePrecision] * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 + N[(0.5 / eps$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 300:\\
\;\;\;\;1 + x \cdot \left(\left(0.5 \cdot x\right) \cdot \left(eps\_m \cdot eps\_m\right)\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.5 + \frac{0.5}{eps\_m}\right) - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < 300Initial program 56.8%
Simplified56.8%
Taylor expanded in x around 0
Simplified57.9%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in x around 0
*-lowering-*.f6488.0%
Simplified88.0%
if 300 < x < 2.10000000000000003e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 2.10000000000000003e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification82.0%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x 290.0)
(+ 1.0 (* x (* (* 0.5 x) (* eps_m eps_m))))
(if (<= x 3.1e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (/ 0.5 eps_m) (+ (/ 0.5 eps_m) -0.5)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 290.0) {
tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m)));
} else if (x <= 3.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -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 <= 290.0d0) then
tmp = 1.0d0 + (x * ((0.5d0 * x) * (eps_m * eps_m)))
else if (x <= 3.1d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 / eps_m) - ((0.5d0 / eps_m) + (-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 <= 290.0) {
tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m)));
} else if (x <= 3.1e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 290.0: tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m))) elif x <= 3.1e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 290.0) tmp = Float64(1.0 + Float64(x * Float64(Float64(0.5 * x) * Float64(eps_m * eps_m)))); elseif (x <= 3.1e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 / eps_m) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 290.0) tmp = 1.0 + (x * ((0.5 * x) * (eps_m * eps_m))); elseif (x <= 3.1e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 290.0], N[(1.0 + N[(x * N[(N[(0.5 * x), $MachinePrecision] * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / eps$95$m), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 290:\\
\;\;\;\;1 + x \cdot \left(\left(0.5 \cdot x\right) \cdot \left(eps\_m \cdot eps\_m\right)\right)\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{eps\_m} - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < 290Initial program 56.8%
Simplified56.8%
Taylor expanded in x around 0
Simplified57.9%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in x around 0
*-lowering-*.f6488.0%
Simplified88.0%
if 290 < x < 3.10000000000000005e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 3.10000000000000005e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Taylor expanded in eps around 0
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification82.0%
eps_m = (fabs.f64 eps)
(FPCore (x eps_m)
:precision binary64
(if (<= x 300.0)
(+ 1.0 (* 0.5 (* eps_m (* eps_m (* x x)))))
(if (<= x 3.4e+115)
(* x (* 0.25 (* x (* eps_m eps_m))))
(- (/ 0.5 eps_m) (+ (/ 0.5 eps_m) -0.5)))))eps_m = fabs(eps);
double code(double x, double eps_m) {
double tmp;
if (x <= 300.0) {
tmp = 1.0 + (0.5 * (eps_m * (eps_m * (x * x))));
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -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 <= 300.0d0) then
tmp = 1.0d0 + (0.5d0 * (eps_m * (eps_m * (x * x))))
else if (x <= 3.4d+115) then
tmp = x * (0.25d0 * (x * (eps_m * eps_m)))
else
tmp = (0.5d0 / eps_m) - ((0.5d0 / eps_m) + (-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 <= 300.0) {
tmp = 1.0 + (0.5 * (eps_m * (eps_m * (x * x))));
} else if (x <= 3.4e+115) {
tmp = x * (0.25 * (x * (eps_m * eps_m)));
} else {
tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5);
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): tmp = 0 if x <= 300.0: tmp = 1.0 + (0.5 * (eps_m * (eps_m * (x * x)))) elif x <= 3.4e+115: tmp = x * (0.25 * (x * (eps_m * eps_m))) else: tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5) return tmp
eps_m = abs(eps) function code(x, eps_m) tmp = 0.0 if (x <= 300.0) tmp = Float64(1.0 + Float64(0.5 * Float64(eps_m * Float64(eps_m * Float64(x * x))))); elseif (x <= 3.4e+115) tmp = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))); else tmp = Float64(Float64(0.5 / eps_m) - Float64(Float64(0.5 / eps_m) + -0.5)); end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) tmp = 0.0; if (x <= 300.0) tmp = 1.0 + (0.5 * (eps_m * (eps_m * (x * x)))); elseif (x <= 3.4e+115) tmp = x * (0.25 * (x * (eps_m * eps_m))); else tmp = (0.5 / eps_m) - ((0.5 / eps_m) + -0.5); end tmp_2 = tmp; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := If[LessEqual[x, 300.0], N[(1.0 + N[(0.5 * N[(eps$95$m * N[(eps$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e+115], N[(x * N[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / eps$95$m), $MachinePrecision] - N[(N[(0.5 / eps$95$m), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 300:\\
\;\;\;\;1 + 0.5 \cdot \left(eps\_m \cdot \left(eps\_m \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{eps\_m} - \left(\frac{0.5}{eps\_m} + -0.5\right)\\
\end{array}
\end{array}
if x < 300Initial program 56.8%
Simplified56.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified51.8%
Taylor expanded in x around 0
Simplified55.4%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.5%
Simplified65.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.7%
Simplified86.7%
if 300 < x < 3.4000000000000001e115Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified43.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.1%
Simplified65.1%
if 3.4000000000000001e115 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.5%
Simplified12.5%
Taylor expanded in x around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6467.7%
Simplified67.7%
Taylor expanded in eps around 0
/-lowering-/.f6467.7%
Simplified67.7%
Final simplification81.1%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (let* ((t_0 (* x (* 0.25 (* x (* eps_m eps_m)))))) (if (<= x -4.6e-44) t_0 (if (<= x 0.023) 1.0 t_0))))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = x * (0.25 * (x * (eps_m * eps_m)));
double tmp;
if (x <= -4.6e-44) {
tmp = t_0;
} else if (x <= 0.023) {
tmp = 1.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 * (0.25d0 * (x * (eps_m * eps_m)))
if (x <= (-4.6d-44)) then
tmp = t_0
else if (x <= 0.023d0) then
tmp = 1.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 * (0.25 * (x * (eps_m * eps_m)));
double tmp;
if (x <= -4.6e-44) {
tmp = t_0;
} else if (x <= 0.023) {
tmp = 1.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = x * (0.25 * (x * (eps_m * eps_m))) tmp = 0 if x <= -4.6e-44: tmp = t_0 elif x <= 0.023: tmp = 1.0 else: tmp = t_0 return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(x * Float64(0.25 * Float64(x * Float64(eps_m * eps_m)))) tmp = 0.0 if (x <= -4.6e-44) tmp = t_0; elseif (x <= 0.023) tmp = 1.0; else tmp = t_0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = x * (0.25 * (x * (eps_m * eps_m))); tmp = 0.0; if (x <= -4.6e-44) tmp = t_0; elseif (x <= 0.023) tmp = 1.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[(0.25 * N[(x * N[(eps$95$m * eps$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e-44], t$95$0, If[LessEqual[x, 0.023], 1.0, t$95$0]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := x \cdot \left(0.25 \cdot \left(x \cdot \left(eps\_m \cdot eps\_m\right)\right)\right)\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{-44}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 0.023:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.59999999999999996e-44 or 0.023 < x Initial program 95.3%
Simplified95.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified58.6%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.0%
Simplified67.0%
if -4.59999999999999996e-44 < x < 0.023Initial program 44.6%
Simplified44.6%
Taylor expanded in x around 0
Simplified83.4%
Final simplification75.5%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 (let* ((t_0 (* 0.25 (* eps_m (* eps_m (* x x)))))) (if (<= x -0.115) t_0 (if (<= x 0.035) 1.0 t_0))))
eps_m = fabs(eps);
double code(double x, double eps_m) {
double t_0 = 0.25 * (eps_m * (eps_m * (x * x)));
double tmp;
if (x <= -0.115) {
tmp = t_0;
} else if (x <= 0.035) {
tmp = 1.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 = 0.25d0 * (eps_m * (eps_m * (x * x)))
if (x <= (-0.115d0)) then
tmp = t_0
else if (x <= 0.035d0) then
tmp = 1.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 = 0.25 * (eps_m * (eps_m * (x * x)));
double tmp;
if (x <= -0.115) {
tmp = t_0;
} else if (x <= 0.035) {
tmp = 1.0;
} else {
tmp = t_0;
}
return tmp;
}
eps_m = math.fabs(eps) def code(x, eps_m): t_0 = 0.25 * (eps_m * (eps_m * (x * x))) tmp = 0 if x <= -0.115: tmp = t_0 elif x <= 0.035: tmp = 1.0 else: tmp = t_0 return tmp
eps_m = abs(eps) function code(x, eps_m) t_0 = Float64(0.25 * Float64(eps_m * Float64(eps_m * Float64(x * x)))) tmp = 0.0 if (x <= -0.115) tmp = t_0; elseif (x <= 0.035) tmp = 1.0; else tmp = t_0; end return tmp end
eps_m = abs(eps); function tmp_2 = code(x, eps_m) t_0 = 0.25 * (eps_m * (eps_m * (x * x))); tmp = 0.0; if (x <= -0.115) tmp = t_0; elseif (x <= 0.035) tmp = 1.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[(0.25 * N[(eps$95$m * N[(eps$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.115], t$95$0, If[LessEqual[x, 0.035], 1.0, t$95$0]]]
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(eps\_m \cdot \left(eps\_m \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;x \leq -0.115:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 0.035:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -0.115000000000000005 or 0.035000000000000003 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Simplified59.7%
Taylor expanded in eps around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.9%
Simplified68.9%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6463.5%
Applied egg-rr63.5%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.8%
Simplified59.8%
if -0.115000000000000005 < x < 0.035000000000000003Initial program 44.8%
Simplified44.8%
Taylor expanded in x around 0
Simplified80.4%
Final simplification71.4%
eps_m = (fabs.f64 eps) (FPCore (x eps_m) :precision binary64 1.0)
eps_m = fabs(eps);
double code(double x, double eps_m) {
return 1.0;
}
eps_m = abs(eps)
real(8) function code(x, eps_m)
real(8), intent (in) :: x
real(8), intent (in) :: eps_m
code = 1.0d0
end function
eps_m = Math.abs(eps);
public static double code(double x, double eps_m) {
return 1.0;
}
eps_m = math.fabs(eps) def code(x, eps_m): return 1.0
eps_m = abs(eps) function code(x, eps_m) return 1.0 end
eps_m = abs(eps); function tmp = code(x, eps_m) tmp = 1.0; end
eps_m = N[Abs[eps], $MachinePrecision] code[x_, eps$95$m_] := 1.0
\begin{array}{l}
eps_m = \left|\varepsilon\right|
\\
1
\end{array}
Initial program 69.0%
Simplified69.0%
Taylor expanded in x around 0
Simplified46.6%
herbie shell --seed 2024162
(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))