
(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}
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (+ 1.0 x) (exp (- x)))) (t_1 (exp (* eps (- x)))))
(if (<= eps -14.5)
(/ (+ (exp (* eps x)) t_1) 2.0)
(if (<= eps 5e-41)
(/ (+ t_0 t_0) 2.0)
(/ (+ (exp (* x (+ -1.0 eps))) t_1) 2.0)))))
double code(double x, double eps) {
double t_0 = (1.0 + x) * exp(-x);
double t_1 = exp((eps * -x));
double tmp;
if (eps <= -14.5) {
tmp = (exp((eps * x)) + t_1) / 2.0;
} else if (eps <= 5e-41) {
tmp = (t_0 + t_0) / 2.0;
} else {
tmp = (exp((x * (-1.0 + eps))) + t_1) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 + x) * exp(-x)
t_1 = exp((eps * -x))
if (eps <= (-14.5d0)) then
tmp = (exp((eps * x)) + t_1) / 2.0d0
else if (eps <= 5d-41) then
tmp = (t_0 + t_0) / 2.0d0
else
tmp = (exp((x * ((-1.0d0) + eps))) + t_1) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = (1.0 + x) * Math.exp(-x);
double t_1 = Math.exp((eps * -x));
double tmp;
if (eps <= -14.5) {
tmp = (Math.exp((eps * x)) + t_1) / 2.0;
} else if (eps <= 5e-41) {
tmp = (t_0 + t_0) / 2.0;
} else {
tmp = (Math.exp((x * (-1.0 + eps))) + t_1) / 2.0;
}
return tmp;
}
def code(x, eps): t_0 = (1.0 + x) * math.exp(-x) t_1 = math.exp((eps * -x)) tmp = 0 if eps <= -14.5: tmp = (math.exp((eps * x)) + t_1) / 2.0 elif eps <= 5e-41: tmp = (t_0 + t_0) / 2.0 else: tmp = (math.exp((x * (-1.0 + eps))) + t_1) / 2.0 return tmp
function code(x, eps) t_0 = Float64(Float64(1.0 + x) * exp(Float64(-x))) t_1 = exp(Float64(eps * Float64(-x))) tmp = 0.0 if (eps <= -14.5) tmp = Float64(Float64(exp(Float64(eps * x)) + t_1) / 2.0); elseif (eps <= 5e-41) tmp = Float64(Float64(t_0 + t_0) / 2.0); else tmp = Float64(Float64(exp(Float64(x * Float64(-1.0 + eps))) + t_1) / 2.0); end return tmp end
function tmp_2 = code(x, eps) t_0 = (1.0 + x) * exp(-x); t_1 = exp((eps * -x)); tmp = 0.0; if (eps <= -14.5) tmp = (exp((eps * x)) + t_1) / 2.0; elseif (eps <= 5e-41) tmp = (t_0 + t_0) / 2.0; else tmp = (exp((x * (-1.0 + eps))) + t_1) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(1.0 + x), $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(eps * (-x)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[eps, -14.5], N[(N[(N[Exp[N[(eps * x), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[eps, 5e-41], N[(N[(t$95$0 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[Exp[N[(x * N[(-1.0 + eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + x\right) \cdot e^{-x}\\
t_1 := e^{\varepsilon \cdot \left(-x\right)}\\
\mathbf{if}\;\varepsilon \leq -14.5:\\
\;\;\;\;\frac{e^{\varepsilon \cdot x} + t_1}{2}\\
\mathbf{elif}\;\varepsilon \leq 5 \cdot 10^{-41}:\\
\;\;\;\;\frac{t_0 + t_0}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(-1 + \varepsilon\right)} + t_1}{2}\\
\end{array}
\end{array}
if eps < -14.5Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
Taylor expanded in eps around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if -14.5 < eps < 4.9999999999999996e-41Initial program 43.7%
div-sub43.7%
+-rgt-identity43.7%
div-sub43.7%
Simplified43.7%
Taylor expanded in eps around 0 98.1%
*-commutative98.1%
distribute-lft1-in98.1%
mul-1-neg98.1%
distribute-lft-out98.1%
mul-1-neg98.1%
*-commutative98.1%
distribute-lft1-in100.0%
mul-1-neg100.0%
Simplified100.0%
if 4.9999999999999996e-41 < eps Initial program 97.2%
div-sub97.2%
+-rgt-identity97.2%
div-sub97.2%
Simplified97.2%
Taylor expanded in eps around inf 100.0%
Taylor expanded in eps around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (+ 1.0 x) (exp (- x)))))
(if (or (<= eps -14.5) (not (<= eps 0.00033)))
(/ (+ (exp (* eps x)) (exp (* eps (- x)))) 2.0)
(/ (+ t_0 t_0) 2.0))))
double code(double x, double eps) {
double t_0 = (1.0 + x) * exp(-x);
double tmp;
if ((eps <= -14.5) || !(eps <= 0.00033)) {
tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0;
} else {
tmp = (t_0 + t_0) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + x) * exp(-x)
if ((eps <= (-14.5d0)) .or. (.not. (eps <= 0.00033d0))) then
tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0d0
else
tmp = (t_0 + t_0) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = (1.0 + x) * Math.exp(-x);
double tmp;
if ((eps <= -14.5) || !(eps <= 0.00033)) {
tmp = (Math.exp((eps * x)) + Math.exp((eps * -x))) / 2.0;
} else {
tmp = (t_0 + t_0) / 2.0;
}
return tmp;
}
def code(x, eps): t_0 = (1.0 + x) * math.exp(-x) tmp = 0 if (eps <= -14.5) or not (eps <= 0.00033): tmp = (math.exp((eps * x)) + math.exp((eps * -x))) / 2.0 else: tmp = (t_0 + t_0) / 2.0 return tmp
function code(x, eps) t_0 = Float64(Float64(1.0 + x) * exp(Float64(-x))) tmp = 0.0 if ((eps <= -14.5) || !(eps <= 0.00033)) tmp = Float64(Float64(exp(Float64(eps * x)) + exp(Float64(eps * Float64(-x)))) / 2.0); else tmp = Float64(Float64(t_0 + t_0) / 2.0); end return tmp end
function tmp_2 = code(x, eps) t_0 = (1.0 + x) * exp(-x); tmp = 0.0; if ((eps <= -14.5) || ~((eps <= 0.00033))) tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0; else tmp = (t_0 + t_0) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(1.0 + x), $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[eps, -14.5], N[Not[LessEqual[eps, 0.00033]], $MachinePrecision]], N[(N[(N[Exp[N[(eps * x), $MachinePrecision]], $MachinePrecision] + N[Exp[N[(eps * (-x)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(t$95$0 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + x\right) \cdot e^{-x}\\
\mathbf{if}\;\varepsilon \leq -14.5 \lor \neg \left(\varepsilon \leq 0.00033\right):\\
\;\;\;\;\frac{e^{\varepsilon \cdot x} + e^{\varepsilon \cdot \left(-x\right)}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 + t_0}{2}\\
\end{array}
\end{array}
if eps < -14.5 or 3.3e-4 < eps Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
Taylor expanded in eps around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if -14.5 < eps < 3.3e-4Initial program 45.0%
div-sub45.0%
+-rgt-identity45.0%
div-sub45.0%
Simplified45.0%
Taylor expanded in eps around 0 98.2%
*-commutative98.2%
distribute-lft1-in98.2%
mul-1-neg98.2%
distribute-lft-out98.2%
mul-1-neg98.2%
*-commutative98.2%
distribute-lft1-in100.0%
mul-1-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x eps) :precision binary64 (if (or (<= eps -4.8e+221) (not (<= eps 9.5e+68))) (/ (+ 1.0 (exp (* x (+ 1.0 eps)))) 2.0) (/ (+ (exp (* x (- -1.0 eps))) (exp (- x))) 2.0)))
double code(double x, double eps) {
double tmp;
if ((eps <= -4.8e+221) || !(eps <= 9.5e+68)) {
tmp = (1.0 + exp((x * (1.0 + eps)))) / 2.0;
} else {
tmp = (exp((x * (-1.0 - eps))) + exp(-x)) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if ((eps <= (-4.8d+221)) .or. (.not. (eps <= 9.5d+68))) then
tmp = (1.0d0 + exp((x * (1.0d0 + eps)))) / 2.0d0
else
tmp = (exp((x * ((-1.0d0) - eps))) + exp(-x)) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if ((eps <= -4.8e+221) || !(eps <= 9.5e+68)) {
tmp = (1.0 + Math.exp((x * (1.0 + eps)))) / 2.0;
} else {
tmp = (Math.exp((x * (-1.0 - eps))) + Math.exp(-x)) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if (eps <= -4.8e+221) or not (eps <= 9.5e+68): tmp = (1.0 + math.exp((x * (1.0 + eps)))) / 2.0 else: tmp = (math.exp((x * (-1.0 - eps))) + math.exp(-x)) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if ((eps <= -4.8e+221) || !(eps <= 9.5e+68)) tmp = Float64(Float64(1.0 + exp(Float64(x * Float64(1.0 + eps)))) / 2.0); else tmp = Float64(Float64(exp(Float64(x * Float64(-1.0 - eps))) + exp(Float64(-x))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if ((eps <= -4.8e+221) || ~((eps <= 9.5e+68))) tmp = (1.0 + exp((x * (1.0 + eps)))) / 2.0; else tmp = (exp((x * (-1.0 - eps))) + exp(-x)) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[Or[LessEqual[eps, -4.8e+221], N[Not[LessEqual[eps, 9.5e+68]], $MachinePrecision]], N[(N[(1.0 + N[Exp[N[(x * N[(1.0 + eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[Exp[N[(x * N[(-1.0 - eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq -4.8 \cdot 10^{+221} \lor \neg \left(\varepsilon \leq 9.5 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{1 + e^{x \cdot \left(1 + \varepsilon\right)}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(-1 - \varepsilon\right)} + e^{-x}}{2}\\
\end{array}
\end{array}
if eps < -4.80000000000000038e221 or 9.50000000000000069e68 < eps Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 49.8%
Taylor expanded in eps around inf 49.8%
+-commutative49.8%
add-sqr-sqrt15.4%
sqrt-unprod39.5%
sqr-neg39.5%
sqrt-unprod31.4%
add-sqr-sqrt76.6%
distribute-rgt-neg-out76.6%
*-commutative76.6%
Applied egg-rr76.6%
if -4.80000000000000038e221 < eps < 9.50000000000000069e68Initial program 68.0%
div-sub68.0%
+-rgt-identity68.0%
div-sub68.0%
Simplified68.0%
Taylor expanded in eps around inf 98.4%
Taylor expanded in eps around 0 96.1%
Final simplification91.2%
(FPCore (x eps) :precision binary64 (if (or (<= eps -4e+119) (not (<= eps 0.00033))) (/ (+ (exp (* eps x)) (exp (* eps (- x)))) 2.0) (/ (+ (exp (* x (- -1.0 eps))) (exp (- x))) 2.0)))
double code(double x, double eps) {
double tmp;
if ((eps <= -4e+119) || !(eps <= 0.00033)) {
tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0;
} else {
tmp = (exp((x * (-1.0 - eps))) + exp(-x)) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if ((eps <= (-4d+119)) .or. (.not. (eps <= 0.00033d0))) then
tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0d0
else
tmp = (exp((x * ((-1.0d0) - eps))) + exp(-x)) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if ((eps <= -4e+119) || !(eps <= 0.00033)) {
tmp = (Math.exp((eps * x)) + Math.exp((eps * -x))) / 2.0;
} else {
tmp = (Math.exp((x * (-1.0 - eps))) + Math.exp(-x)) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if (eps <= -4e+119) or not (eps <= 0.00033): tmp = (math.exp((eps * x)) + math.exp((eps * -x))) / 2.0 else: tmp = (math.exp((x * (-1.0 - eps))) + math.exp(-x)) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if ((eps <= -4e+119) || !(eps <= 0.00033)) tmp = Float64(Float64(exp(Float64(eps * x)) + exp(Float64(eps * Float64(-x)))) / 2.0); else tmp = Float64(Float64(exp(Float64(x * Float64(-1.0 - eps))) + exp(Float64(-x))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if ((eps <= -4e+119) || ~((eps <= 0.00033))) tmp = (exp((eps * x)) + exp((eps * -x))) / 2.0; else tmp = (exp((x * (-1.0 - eps))) + exp(-x)) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[Or[LessEqual[eps, -4e+119], N[Not[LessEqual[eps, 0.00033]], $MachinePrecision]], N[(N[(N[Exp[N[(eps * x), $MachinePrecision]], $MachinePrecision] + N[Exp[N[(eps * (-x)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[Exp[N[(x * N[(-1.0 - eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq -4 \cdot 10^{+119} \lor \neg \left(\varepsilon \leq 0.00033\right):\\
\;\;\;\;\frac{e^{\varepsilon \cdot x} + e^{\varepsilon \cdot \left(-x\right)}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(-1 - \varepsilon\right)} + e^{-x}}{2}\\
\end{array}
\end{array}
if eps < -3.99999999999999978e119 or 3.3e-4 < eps Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
Taylor expanded in eps around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in eps around inf 100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if -3.99999999999999978e119 < eps < 3.3e-4Initial program 56.4%
div-sub56.4%
+-rgt-identity56.4%
div-sub56.4%
Simplified56.4%
Taylor expanded in eps around inf 97.8%
Taylor expanded in eps around 0 97.8%
Final simplification98.8%
(FPCore (x eps) :precision binary64 (/ (+ (exp (* x (+ -1.0 eps))) (exp (* x (- -1.0 eps)))) 2.0))
double code(double x, double eps) {
return (exp((x * (-1.0 + eps))) + exp((x * (-1.0 - eps)))) / 2.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (exp((x * ((-1.0d0) + eps))) + exp((x * ((-1.0d0) - eps)))) / 2.0d0
end function
public static double code(double x, double eps) {
return (Math.exp((x * (-1.0 + eps))) + Math.exp((x * (-1.0 - eps)))) / 2.0;
}
def code(x, eps): return (math.exp((x * (-1.0 + eps))) + math.exp((x * (-1.0 - eps)))) / 2.0
function code(x, eps) return Float64(Float64(exp(Float64(x * Float64(-1.0 + eps))) + exp(Float64(x * Float64(-1.0 - eps)))) / 2.0) end
function tmp = code(x, eps) tmp = (exp((x * (-1.0 + eps))) + exp((x * (-1.0 - eps)))) / 2.0; end
code[x_, eps_] := N[(N[(N[Exp[N[(x * N[(-1.0 + eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Exp[N[(x * N[(-1.0 - eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{x \cdot \left(-1 + \varepsilon\right)} + e^{x \cdot \left(-1 - \varepsilon\right)}}{2}
\end{array}
Initial program 76.1%
div-sub76.1%
+-rgt-identity76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in eps around inf 98.8%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(if (<= x -6.5e-12)
(/ (+ 1.0 (exp (- x))) 2.0)
(if (<= x 2.7e+19)
(/ (+ 1.0 (exp (* x (+ 1.0 eps)))) 2.0)
(/ (* x (+ (/ -1.0 eps) (* (+ 1.0 eps) (+ -1.0 (/ 1.0 eps))))) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -6.5e-12) {
tmp = (1.0 + exp(-x)) / 2.0;
} else if (x <= 2.7e+19) {
tmp = (1.0 + exp((x * (1.0 + eps)))) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-6.5d-12)) then
tmp = (1.0d0 + exp(-x)) / 2.0d0
else if (x <= 2.7d+19) then
tmp = (1.0d0 + exp((x * (1.0d0 + eps)))) / 2.0d0
else
tmp = (x * (((-1.0d0) / eps) + ((1.0d0 + eps) * ((-1.0d0) + (1.0d0 / eps))))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -6.5e-12) {
tmp = (1.0 + Math.exp(-x)) / 2.0;
} else if (x <= 2.7e+19) {
tmp = (1.0 + Math.exp((x * (1.0 + eps)))) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -6.5e-12: tmp = (1.0 + math.exp(-x)) / 2.0 elif x <= 2.7e+19: tmp = (1.0 + math.exp((x * (1.0 + eps)))) / 2.0 else: tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -6.5e-12) tmp = Float64(Float64(1.0 + exp(Float64(-x))) / 2.0); elseif (x <= 2.7e+19) tmp = Float64(Float64(1.0 + exp(Float64(x * Float64(1.0 + eps)))) / 2.0); else tmp = Float64(Float64(x * Float64(Float64(-1.0 / eps) + Float64(Float64(1.0 + eps) * Float64(-1.0 + Float64(1.0 / eps))))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -6.5e-12) tmp = (1.0 + exp(-x)) / 2.0; elseif (x <= 2.7e+19) tmp = (1.0 + exp((x * (1.0 + eps)))) / 2.0; else tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -6.5e-12], N[(N[(1.0 + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 2.7e+19], N[(N[(1.0 + N[Exp[N[(x * N[(1.0 + eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x * N[(N[(-1.0 / eps), $MachinePrecision] + N[(N[(1.0 + eps), $MachinePrecision] * N[(-1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{1 + e^{-x}}{2}\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+19}:\\
\;\;\;\;\frac{1 + e^{x \cdot \left(1 + \varepsilon\right)}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{-1}{\varepsilon} + \left(1 + \varepsilon\right) \cdot \left(-1 + \frac{1}{\varepsilon}\right)\right)}{2}\\
\end{array}
\end{array}
if x < -6.5000000000000002e-12Initial program 92.6%
div-sub92.6%
+-rgt-identity92.6%
div-sub92.6%
Simplified92.6%
Taylor expanded in x around 0 51.5%
+-commutative51.5%
associate-+l+51.5%
*-commutative51.5%
associate-*l*51.5%
+-commutative51.5%
*-commutative51.5%
associate-*l*51.5%
*-commutative51.5%
neg-mul-151.5%
sub-neg51.5%
+-commutative51.5%
distribute-neg-in51.5%
remove-double-neg51.5%
metadata-eval51.5%
distribute-rgt-out51.5%
mul-1-neg51.5%
unsub-neg51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in eps around inf 53.4%
Taylor expanded in eps around 0 94.5%
sub-neg94.5%
distribute-lft1-in94.5%
metadata-eval94.5%
mul0-lft94.5%
metadata-eval94.5%
mul-1-neg94.5%
remove-double-neg94.5%
mul-1-neg94.5%
Simplified94.5%
if -6.5000000000000002e-12 < x < 2.7e19Initial program 57.3%
div-sub57.3%
+-rgt-identity57.3%
div-sub57.3%
Simplified57.3%
Taylor expanded in x around 0 42.2%
Taylor expanded in eps around inf 84.4%
+-commutative84.4%
add-sqr-sqrt44.7%
sqrt-unprod85.8%
sqr-neg85.8%
sqrt-unprod44.6%
add-sqr-sqrt90.7%
distribute-rgt-neg-out90.7%
*-commutative90.7%
Applied egg-rr90.7%
if 2.7e19 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 3.1%
Taylor expanded in eps around 0 17.4%
Taylor expanded in x around inf 69.5%
mul-1-neg69.5%
mul-1-neg69.5%
sub-neg69.5%
metadata-eval69.5%
*-commutative69.5%
+-commutative69.5%
metadata-eval69.5%
sub-neg69.5%
sub-neg69.5%
metadata-eval69.5%
sub-neg69.5%
Simplified69.5%
Final simplification84.7%
(FPCore (x eps)
:precision binary64
(if (<= x -3.4e+31)
(/ (+ 1.0 (exp (- x))) 2.0)
(if (<= x 720.0)
(/ (+ 1.0 (exp (* eps (- x)))) 2.0)
(/ (* x (+ (/ -1.0 eps) (* (+ 1.0 eps) (+ -1.0 (/ 1.0 eps))))) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -3.4e+31) {
tmp = (1.0 + exp(-x)) / 2.0;
} else if (x <= 720.0) {
tmp = (1.0 + exp((eps * -x))) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-3.4d+31)) then
tmp = (1.0d0 + exp(-x)) / 2.0d0
else if (x <= 720.0d0) then
tmp = (1.0d0 + exp((eps * -x))) / 2.0d0
else
tmp = (x * (((-1.0d0) / eps) + ((1.0d0 + eps) * ((-1.0d0) + (1.0d0 / eps))))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -3.4e+31) {
tmp = (1.0 + Math.exp(-x)) / 2.0;
} else if (x <= 720.0) {
tmp = (1.0 + Math.exp((eps * -x))) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -3.4e+31: tmp = (1.0 + math.exp(-x)) / 2.0 elif x <= 720.0: tmp = (1.0 + math.exp((eps * -x))) / 2.0 else: tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -3.4e+31) tmp = Float64(Float64(1.0 + exp(Float64(-x))) / 2.0); elseif (x <= 720.0) tmp = Float64(Float64(1.0 + exp(Float64(eps * Float64(-x)))) / 2.0); else tmp = Float64(Float64(x * Float64(Float64(-1.0 / eps) + Float64(Float64(1.0 + eps) * Float64(-1.0 + Float64(1.0 / eps))))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -3.4e+31) tmp = (1.0 + exp(-x)) / 2.0; elseif (x <= 720.0) tmp = (1.0 + exp((eps * -x))) / 2.0; else tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -3.4e+31], N[(N[(1.0 + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 720.0], N[(N[(1.0 + N[Exp[N[(eps * (-x)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x * N[(N[(-1.0 / eps), $MachinePrecision] + N[(N[(1.0 + eps), $MachinePrecision] * N[(-1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{1 + e^{-x}}{2}\\
\mathbf{elif}\;x \leq 720:\\
\;\;\;\;\frac{1 + e^{\varepsilon \cdot \left(-x\right)}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{-1}{\varepsilon} + \left(1 + \varepsilon\right) \cdot \left(-1 + \frac{1}{\varepsilon}\right)\right)}{2}\\
\end{array}
\end{array}
if x < -3.3999999999999998e31Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 53.0%
+-commutative53.0%
associate-+l+53.0%
*-commutative53.0%
associate-*l*53.0%
+-commutative53.0%
*-commutative53.0%
associate-*l*53.0%
*-commutative53.0%
neg-mul-153.0%
sub-neg53.0%
+-commutative53.0%
distribute-neg-in53.0%
remove-double-neg53.0%
metadata-eval53.0%
distribute-rgt-out53.0%
mul-1-neg53.0%
unsub-neg53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in eps around inf 53.0%
Taylor expanded in eps around 0 100.0%
sub-neg100.0%
distribute-lft1-in100.0%
metadata-eval100.0%
mul0-lft100.0%
metadata-eval100.0%
mul-1-neg100.0%
remove-double-neg100.0%
mul-1-neg100.0%
Simplified100.0%
if -3.3999999999999998e31 < x < 720Initial program 56.0%
div-sub56.0%
+-rgt-identity56.0%
div-sub56.0%
Simplified56.0%
Taylor expanded in x around 0 42.7%
Taylor expanded in eps around inf 84.5%
Taylor expanded in eps around inf 84.6%
*-commutative97.8%
Simplified84.6%
if 720 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 3.1%
Taylor expanded in eps around 0 17.0%
Taylor expanded in x around inf 69.0%
mul-1-neg69.0%
mul-1-neg69.0%
sub-neg69.0%
metadata-eval69.0%
*-commutative69.0%
+-commutative69.0%
metadata-eval69.0%
sub-neg69.0%
sub-neg69.0%
metadata-eval69.0%
sub-neg69.0%
Simplified69.0%
Final simplification81.7%
(FPCore (x eps) :precision binary64 (if (<= x 460.0) (/ (+ 1.0 (exp (- x))) 2.0) (/ (* x (+ (/ -1.0 eps) (* (+ 1.0 eps) (+ -1.0 (/ 1.0 eps))))) 2.0)))
double code(double x, double eps) {
double tmp;
if (x <= 460.0) {
tmp = (1.0 + exp(-x)) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= 460.0d0) then
tmp = (1.0d0 + exp(-x)) / 2.0d0
else
tmp = (x * (((-1.0d0) / eps) + ((1.0d0 + eps) * ((-1.0d0) + (1.0d0 / eps))))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= 460.0) {
tmp = (1.0 + Math.exp(-x)) / 2.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= 460.0: tmp = (1.0 + math.exp(-x)) / 2.0 else: tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= 460.0) tmp = Float64(Float64(1.0 + exp(Float64(-x))) / 2.0); else tmp = Float64(Float64(x * Float64(Float64(-1.0 / eps) + Float64(Float64(1.0 + eps) * Float64(-1.0 + Float64(1.0 / eps))))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= 460.0) tmp = (1.0 + exp(-x)) / 2.0; else tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, 460.0], N[(N[(1.0 + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x * N[(N[(-1.0 / eps), $MachinePrecision] + N[(N[(1.0 + eps), $MachinePrecision] * N[(-1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 460:\\
\;\;\;\;\frac{1 + e^{-x}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{-1}{\varepsilon} + \left(1 + \varepsilon\right) \cdot \left(-1 + \frac{1}{\varepsilon}\right)\right)}{2}\\
\end{array}
\end{array}
if x < 460Initial program 64.9%
div-sub64.9%
+-rgt-identity64.9%
div-sub64.9%
Simplified64.9%
Taylor expanded in x around 0 45.2%
+-commutative45.2%
associate-+l+45.2%
*-commutative45.2%
associate-*l*45.2%
+-commutative45.2%
*-commutative45.2%
associate-*l*45.2%
*-commutative45.2%
neg-mul-145.2%
sub-neg45.2%
+-commutative45.2%
distribute-neg-in45.2%
remove-double-neg45.2%
metadata-eval45.2%
distribute-rgt-out45.2%
mul-1-neg45.2%
unsub-neg45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in eps around inf 78.6%
Taylor expanded in eps around 0 82.4%
sub-neg82.4%
distribute-lft1-in82.4%
metadata-eval82.4%
mul0-lft82.4%
metadata-eval82.4%
mul-1-neg82.4%
remove-double-neg82.4%
mul-1-neg82.4%
Simplified82.4%
if 460 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 3.1%
Taylor expanded in eps around 0 17.0%
Taylor expanded in x around inf 69.0%
mul-1-neg69.0%
mul-1-neg69.0%
sub-neg69.0%
metadata-eval69.0%
*-commutative69.0%
+-commutative69.0%
metadata-eval69.0%
sub-neg69.0%
sub-neg69.0%
metadata-eval69.0%
sub-neg69.0%
Simplified69.0%
Final simplification78.1%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (+ (/ -1.0 eps) (* (+ 1.0 eps) (+ -1.0 (/ 1.0 eps)))))))
(if (<= x -7.3e+207)
(/ (+ (/ x eps) (* -0.5 (/ (* x x) eps))) 2.0)
(if (<= x 400.0) (/ (+ 2.0 t_0) 2.0) (/ t_0 2.0)))))
double code(double x, double eps) {
double t_0 = x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))));
double tmp;
if (x <= -7.3e+207) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 400.0) {
tmp = (2.0 + t_0) / 2.0;
} else {
tmp = t_0 / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = x * (((-1.0d0) / eps) + ((1.0d0 + eps) * ((-1.0d0) + (1.0d0 / eps))))
if (x <= (-7.3d+207)) then
tmp = ((x / eps) + ((-0.5d0) * ((x * x) / eps))) / 2.0d0
else if (x <= 400.0d0) then
tmp = (2.0d0 + t_0) / 2.0d0
else
tmp = t_0 / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))));
double tmp;
if (x <= -7.3e+207) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 400.0) {
tmp = (2.0 + t_0) / 2.0;
} else {
tmp = t_0 / 2.0;
}
return tmp;
}
def code(x, eps): t_0 = x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps)))) tmp = 0 if x <= -7.3e+207: tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0 elif x <= 400.0: tmp = (2.0 + t_0) / 2.0 else: tmp = t_0 / 2.0 return tmp
function code(x, eps) t_0 = Float64(x * Float64(Float64(-1.0 / eps) + Float64(Float64(1.0 + eps) * Float64(-1.0 + Float64(1.0 / eps))))) tmp = 0.0 if (x <= -7.3e+207) tmp = Float64(Float64(Float64(x / eps) + Float64(-0.5 * Float64(Float64(x * x) / eps))) / 2.0); elseif (x <= 400.0) tmp = Float64(Float64(2.0 + t_0) / 2.0); else tmp = Float64(t_0 / 2.0); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps)))); tmp = 0.0; if (x <= -7.3e+207) tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0; elseif (x <= 400.0) tmp = (2.0 + t_0) / 2.0; else tmp = t_0 / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(N[(-1.0 / eps), $MachinePrecision] + N[(N[(1.0 + eps), $MachinePrecision] * N[(-1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.3e+207], N[(N[(N[(x / eps), $MachinePrecision] + N[(-0.5 * N[(N[(x * x), $MachinePrecision] / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 400.0], N[(N[(2.0 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision], N[(t$95$0 / 2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\frac{-1}{\varepsilon} + \left(1 + \varepsilon\right) \cdot \left(-1 + \frac{1}{\varepsilon}\right)\right)\\
\mathbf{if}\;x \leq -7.3 \cdot 10^{+207}:\\
\;\;\;\;\frac{\frac{x}{\varepsilon} + -0.5 \cdot \frac{x \cdot x}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 400:\\
\;\;\;\;\frac{2 + t_0}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{2}\\
\end{array}
\end{array}
if x < -7.30000000000000014e207Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 33.7%
Taylor expanded in eps around 0 68.4%
mul-1-neg68.4%
Simplified68.4%
Taylor expanded in x around 0 68.4%
unpow268.4%
Simplified68.4%
if -7.30000000000000014e207 < x < 400Initial program 60.6%
div-sub60.6%
+-rgt-identity60.6%
div-sub60.6%
Simplified60.6%
Taylor expanded in x around 0 69.1%
Taylor expanded in eps around 0 70.4%
if 400 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 3.1%
Taylor expanded in eps around 0 17.0%
Taylor expanded in x around inf 69.0%
mul-1-neg69.0%
mul-1-neg69.0%
sub-neg69.0%
metadata-eval69.0%
*-commutative69.0%
+-commutative69.0%
metadata-eval69.0%
sub-neg69.0%
sub-neg69.0%
metadata-eval69.0%
sub-neg69.0%
Simplified69.0%
Final simplification69.8%
(FPCore (x eps)
:precision binary64
(if (<= x -5.2e+183)
(/ (+ (/ x eps) (* -0.5 (/ (* x x) eps))) 2.0)
(if (<= x 430.0)
1.0
(/ (* x (+ (/ -1.0 eps) (* (+ 1.0 eps) (+ -1.0 (/ 1.0 eps))))) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 430.0) {
tmp = 1.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.2d+183)) then
tmp = ((x / eps) + ((-0.5d0) * ((x * x) / eps))) / 2.0d0
else if (x <= 430.0d0) then
tmp = 1.0d0
else
tmp = (x * (((-1.0d0) / eps) + ((1.0d0 + eps) * ((-1.0d0) + (1.0d0 / eps))))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 430.0) {
tmp = 1.0;
} else {
tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.2e+183: tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0 elif x <= 430.0: tmp = 1.0 else: tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.2e+183) tmp = Float64(Float64(Float64(x / eps) + Float64(-0.5 * Float64(Float64(x * x) / eps))) / 2.0); elseif (x <= 430.0) tmp = 1.0; else tmp = Float64(Float64(x * Float64(Float64(-1.0 / eps) + Float64(Float64(1.0 + eps) * Float64(-1.0 + Float64(1.0 / eps))))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.2e+183) tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0; elseif (x <= 430.0) tmp = 1.0; else tmp = (x * ((-1.0 / eps) + ((1.0 + eps) * (-1.0 + (1.0 / eps))))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.2e+183], N[(N[(N[(x / eps), $MachinePrecision] + N[(-0.5 * N[(N[(x * x), $MachinePrecision] / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 430.0], 1.0, N[(N[(x * N[(N[(-1.0 / eps), $MachinePrecision] + N[(N[(1.0 + eps), $MachinePrecision] * N[(-1.0 + N[(1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+183}:\\
\;\;\;\;\frac{\frac{x}{\varepsilon} + -0.5 \cdot \frac{x \cdot x}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 430:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{-1}{\varepsilon} + \left(1 + \varepsilon\right) \cdot \left(-1 + \frac{1}{\varepsilon}\right)\right)}{2}\\
\end{array}
\end{array}
if x < -5.1999999999999999e183Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 38.4%
Taylor expanded in eps around 0 63.6%
mul-1-neg63.6%
Simplified63.6%
Taylor expanded in x around 0 63.6%
unpow263.6%
Simplified63.6%
if -5.1999999999999999e183 < x < 430Initial program 59.8%
div-sub59.8%
+-rgt-identity59.8%
div-sub59.8%
Simplified59.8%
Taylor expanded in x around 0 70.4%
if 430 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 3.1%
Taylor expanded in eps around 0 17.0%
Taylor expanded in x around inf 69.0%
mul-1-neg69.0%
mul-1-neg69.0%
sub-neg69.0%
metadata-eval69.0%
*-commutative69.0%
+-commutative69.0%
metadata-eval69.0%
sub-neg69.0%
sub-neg69.0%
metadata-eval69.0%
sub-neg69.0%
Simplified69.0%
Final simplification69.4%
(FPCore (x eps) :precision binary64 (if (<= x -2.2) (/ (* (* (- 1.0 eps) x) (+ -1.0 (/ -1.0 eps))) 2.0) (if (<= x 500.0) 1.0 (/ (/ 0.0 eps) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -2.2) {
tmp = (((1.0 - eps) * x) * (-1.0 + (-1.0 / eps))) / 2.0;
} else if (x <= 500.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-2.2d0)) then
tmp = (((1.0d0 - eps) * x) * ((-1.0d0) + ((-1.0d0) / eps))) / 2.0d0
else if (x <= 500.0d0) then
tmp = 1.0d0
else
tmp = (0.0d0 / eps) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -2.2) {
tmp = (((1.0 - eps) * x) * (-1.0 + (-1.0 / eps))) / 2.0;
} else if (x <= 500.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -2.2: tmp = (((1.0 - eps) * x) * (-1.0 + (-1.0 / eps))) / 2.0 elif x <= 500.0: tmp = 1.0 else: tmp = (0.0 / eps) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -2.2) tmp = Float64(Float64(Float64(Float64(1.0 - eps) * x) * Float64(-1.0 + Float64(-1.0 / eps))) / 2.0); elseif (x <= 500.0) tmp = 1.0; else tmp = Float64(Float64(0.0 / eps) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -2.2) tmp = (((1.0 - eps) * x) * (-1.0 + (-1.0 / eps))) / 2.0; elseif (x <= 500.0) tmp = 1.0; else tmp = (0.0 / eps) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -2.2], N[(N[(N[(N[(1.0 - eps), $MachinePrecision] * x), $MachinePrecision] * N[(-1.0 + N[(-1.0 / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 500.0], 1.0, N[(N[(0.0 / eps), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2:\\
\;\;\;\;\frac{\left(\left(1 - \varepsilon\right) \cdot x\right) \cdot \left(-1 + \frac{-1}{\varepsilon}\right)}{2}\\
\mathbf{elif}\;x \leq 500:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0}{\varepsilon}}{2}\\
\end{array}
\end{array}
if x < -2.2000000000000002Initial program 94.9%
div-sub94.9%
+-rgt-identity94.9%
div-sub94.9%
Simplified94.9%
Taylor expanded in x around 0 52.7%
+-commutative52.7%
associate-+l+52.7%
*-commutative52.7%
associate-*l*52.7%
+-commutative52.7%
*-commutative52.7%
associate-*l*52.7%
*-commutative52.7%
neg-mul-152.7%
sub-neg52.7%
+-commutative52.7%
distribute-neg-in52.7%
remove-double-neg52.7%
metadata-eval52.7%
distribute-rgt-out52.7%
mul-1-neg52.7%
unsub-neg52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x around inf 32.7%
if -2.2000000000000002 < x < 500Initial program 56.2%
div-sub56.2%
+-rgt-identity56.2%
div-sub56.2%
Simplified56.2%
Taylor expanded in x around 0 78.9%
if 500 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 26.3%
Taylor expanded in eps around 0 1.9%
mul-1-neg1.9%
Simplified1.9%
flip--1.9%
metadata-eval1.9%
neg-mul-11.9%
neg-mul-11.9%
prod-exp1.9%
add-sqr-sqrt0.0%
sqrt-unprod41.0%
neg-mul-141.0%
neg-mul-141.0%
sqr-neg41.0%
sqrt-unprod44.8%
add-sqr-sqrt56.8%
distribute-lft1-in56.8%
metadata-eval56.8%
metadata-eval56.8%
exp-prod56.8%
add-exp-log56.8%
neg-mul-156.8%
Applied egg-rr56.8%
pow-base-156.8%
div-sub56.8%
+-inverses56.8%
Simplified56.8%
Final simplification64.8%
(FPCore (x eps) :precision binary64 (if (<= x -5.2e+183) (/ (+ (/ x eps) (* -0.5 (/ (* x x) eps))) 2.0) (if (<= x 500.0) 1.0 (/ (/ 0.0 eps) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 500.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.2d+183)) then
tmp = ((x / eps) + ((-0.5d0) * ((x * x) / eps))) / 2.0d0
else if (x <= 500.0d0) then
tmp = 1.0d0
else
tmp = (0.0d0 / eps) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0;
} else if (x <= 500.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.2e+183: tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0 elif x <= 500.0: tmp = 1.0 else: tmp = (0.0 / eps) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.2e+183) tmp = Float64(Float64(Float64(x / eps) + Float64(-0.5 * Float64(Float64(x * x) / eps))) / 2.0); elseif (x <= 500.0) tmp = 1.0; else tmp = Float64(Float64(0.0 / eps) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.2e+183) tmp = ((x / eps) + (-0.5 * ((x * x) / eps))) / 2.0; elseif (x <= 500.0) tmp = 1.0; else tmp = (0.0 / eps) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.2e+183], N[(N[(N[(x / eps), $MachinePrecision] + N[(-0.5 * N[(N[(x * x), $MachinePrecision] / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 500.0], 1.0, N[(N[(0.0 / eps), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+183}:\\
\;\;\;\;\frac{\frac{x}{\varepsilon} + -0.5 \cdot \frac{x \cdot x}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 500:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0}{\varepsilon}}{2}\\
\end{array}
\end{array}
if x < -5.1999999999999999e183Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 38.4%
Taylor expanded in eps around 0 63.6%
mul-1-neg63.6%
Simplified63.6%
Taylor expanded in x around 0 63.6%
unpow263.6%
Simplified63.6%
if -5.1999999999999999e183 < x < 500Initial program 59.8%
div-sub59.8%
+-rgt-identity59.8%
div-sub59.8%
Simplified59.8%
Taylor expanded in x around 0 70.4%
if 500 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 26.3%
Taylor expanded in eps around 0 1.9%
mul-1-neg1.9%
Simplified1.9%
flip--1.9%
metadata-eval1.9%
neg-mul-11.9%
neg-mul-11.9%
prod-exp1.9%
add-sqr-sqrt0.0%
sqrt-unprod41.0%
neg-mul-141.0%
neg-mul-141.0%
sqr-neg41.0%
sqrt-unprod44.8%
add-sqr-sqrt56.8%
distribute-lft1-in56.8%
metadata-eval56.8%
metadata-eval56.8%
exp-prod56.8%
add-exp-log56.8%
neg-mul-156.8%
Applied egg-rr56.8%
pow-base-156.8%
div-sub56.8%
+-inverses56.8%
Simplified56.8%
Final simplification65.4%
(FPCore (x eps) :precision binary64 (if (or (<= x -5.2e+183) (not (<= x 320.0))) (/ (* eps x) 2.0) 1.0))
double code(double x, double eps) {
double tmp;
if ((x <= -5.2e+183) || !(x <= 320.0)) {
tmp = (eps * x) / 2.0;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if ((x <= (-5.2d+183)) .or. (.not. (x <= 320.0d0))) then
tmp = (eps * x) / 2.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if ((x <= -5.2e+183) || !(x <= 320.0)) {
tmp = (eps * x) / 2.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if (x <= -5.2e+183) or not (x <= 320.0): tmp = (eps * x) / 2.0 else: tmp = 1.0 return tmp
function code(x, eps) tmp = 0.0 if ((x <= -5.2e+183) || !(x <= 320.0)) tmp = Float64(Float64(eps * x) / 2.0); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if ((x <= -5.2e+183) || ~((x <= 320.0))) tmp = (eps * x) / 2.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, eps_] := If[Or[LessEqual[x, -5.2e+183], N[Not[LessEqual[x, 320.0]], $MachinePrecision]], N[(N[(eps * x), $MachinePrecision] / 2.0), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+183} \lor \neg \left(x \leq 320\right):\\
\;\;\;\;\frac{\varepsilon \cdot x}{2}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -5.1999999999999999e183 or 320 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 29.2%
+-commutative29.2%
associate-+l+29.2%
*-commutative29.2%
associate-*l*29.2%
+-commutative29.2%
*-commutative29.2%
associate-*l*29.2%
*-commutative29.2%
neg-mul-129.2%
sub-neg29.2%
+-commutative29.2%
distribute-neg-in29.2%
remove-double-neg29.2%
metadata-eval29.2%
distribute-rgt-out29.2%
mul-1-neg29.2%
unsub-neg29.2%
*-commutative29.2%
Simplified29.2%
Taylor expanded in x around inf 21.6%
Taylor expanded in eps around inf 22.2%
*-commutative22.2%
Simplified22.2%
if -5.1999999999999999e183 < x < 320Initial program 59.8%
div-sub59.8%
+-rgt-identity59.8%
div-sub59.8%
Simplified59.8%
Taylor expanded in x around 0 70.4%
Final simplification50.8%
(FPCore (x eps) :precision binary64 (if (<= x -5.2e+183) (/ (* eps x) 2.0) (if (<= x 550.0) 1.0 (/ (/ 0.0 eps) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = (eps * x) / 2.0;
} else if (x <= 550.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.2d+183)) then
tmp = (eps * x) / 2.0d0
else if (x <= 550.0d0) then
tmp = 1.0d0
else
tmp = (0.0d0 / eps) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.2e+183) {
tmp = (eps * x) / 2.0;
} else if (x <= 550.0) {
tmp = 1.0;
} else {
tmp = (0.0 / eps) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.2e+183: tmp = (eps * x) / 2.0 elif x <= 550.0: tmp = 1.0 else: tmp = (0.0 / eps) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.2e+183) tmp = Float64(Float64(eps * x) / 2.0); elseif (x <= 550.0) tmp = 1.0; else tmp = Float64(Float64(0.0 / eps) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.2e+183) tmp = (eps * x) / 2.0; elseif (x <= 550.0) tmp = 1.0; else tmp = (0.0 / eps) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.2e+183], N[(N[(eps * x), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 550.0], 1.0, N[(N[(0.0 / eps), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+183}:\\
\;\;\;\;\frac{\varepsilon \cdot x}{2}\\
\mathbf{elif}\;x \leq 550:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0}{\varepsilon}}{2}\\
\end{array}
\end{array}
if x < -5.1999999999999999e183Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 55.3%
+-commutative55.3%
associate-+l+55.3%
*-commutative55.3%
associate-*l*55.3%
+-commutative55.3%
*-commutative55.3%
associate-*l*55.3%
*-commutative55.3%
neg-mul-155.3%
sub-neg55.3%
+-commutative55.3%
distribute-neg-in55.3%
remove-double-neg55.3%
metadata-eval55.3%
distribute-rgt-out55.3%
mul-1-neg55.3%
unsub-neg55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in x around inf 55.3%
Taylor expanded in eps around inf 55.3%
*-commutative55.3%
Simplified55.3%
if -5.1999999999999999e183 < x < 550Initial program 59.8%
div-sub59.8%
+-rgt-identity59.8%
div-sub59.8%
Simplified59.8%
Taylor expanded in x around 0 70.4%
if 550 < x Initial program 100.0%
div-sub100.0%
+-rgt-identity100.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 26.3%
Taylor expanded in eps around 0 1.9%
mul-1-neg1.9%
Simplified1.9%
flip--1.9%
metadata-eval1.9%
neg-mul-11.9%
neg-mul-11.9%
prod-exp1.9%
add-sqr-sqrt0.0%
sqrt-unprod41.0%
neg-mul-141.0%
neg-mul-141.0%
sqr-neg41.0%
sqrt-unprod44.8%
add-sqr-sqrt56.8%
distribute-lft1-in56.8%
metadata-eval56.8%
metadata-eval56.8%
exp-prod56.8%
add-exp-log56.8%
neg-mul-156.8%
Applied egg-rr56.8%
pow-base-156.8%
div-sub56.8%
+-inverses56.8%
Simplified56.8%
Final simplification64.7%
(FPCore (x eps) :precision binary64 1.0)
double code(double x, double eps) {
return 1.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = 1.0d0
end function
public static double code(double x, double eps) {
return 1.0;
}
def code(x, eps): return 1.0
function code(x, eps) return 1.0 end
function tmp = code(x, eps) tmp = 1.0; end
code[x_, eps_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 76.1%
div-sub76.1%
+-rgt-identity76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in x around 0 43.1%
Final simplification43.1%
herbie shell --seed 2023178
(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))