
(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 16 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 (/ (+ (exp (* x (+ eps -1.0))) (/ 1.0 (exp (+ x (* x eps))))) 2.0))
double code(double x, double eps) {
return (exp((x * (eps + -1.0))) + (1.0 / exp((x + (x * eps))))) / 2.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = (exp((x * (eps + (-1.0d0)))) + (1.0d0 / exp((x + (x * eps))))) / 2.0d0
end function
public static double code(double x, double eps) {
return (Math.exp((x * (eps + -1.0))) + (1.0 / Math.exp((x + (x * eps))))) / 2.0;
}
def code(x, eps): return (math.exp((x * (eps + -1.0))) + (1.0 / math.exp((x + (x * eps))))) / 2.0
function code(x, eps) return Float64(Float64(exp(Float64(x * Float64(eps + -1.0))) + Float64(1.0 / exp(Float64(x + Float64(x * eps))))) / 2.0) end
function tmp = code(x, eps) tmp = (exp((x * (eps + -1.0))) + (1.0 / exp((x + (x * eps))))) / 2.0; end
code[x_, eps_] := N[(N[(N[Exp[N[(x * N[(eps + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Exp[N[(x + N[(x * eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{x \cdot \left(\varepsilon + -1\right)} + \frac{1}{e^{x + x \cdot \varepsilon}}}{2}
\end{array}
Initial program 70.9%
Simplified62.7%
Taylor expanded in eps around inf 98.9%
Final simplification98.9%
(FPCore (x eps)
:precision binary64
(if (<= x -2e-297)
(/ (+ 1.0 (/ 1.0 (exp (+ x (* x eps))))) 2.0)
(if (<= x 2e+261)
(/ (+ 1.0 (exp (* x eps))) 2.0)
(/ (* (exp (- x)) (+ 2.0 (* x 2.0))) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -2e-297) {
tmp = (1.0 + (1.0 / exp((x + (x * eps))))) / 2.0;
} else if (x <= 2e+261) {
tmp = (1.0 + exp((x * eps))) / 2.0;
} else {
tmp = (exp(-x) * (2.0 + (x * 2.0))) / 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 <= (-2d-297)) then
tmp = (1.0d0 + (1.0d0 / exp((x + (x * eps))))) / 2.0d0
else if (x <= 2d+261) then
tmp = (1.0d0 + exp((x * eps))) / 2.0d0
else
tmp = (exp(-x) * (2.0d0 + (x * 2.0d0))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -2e-297) {
tmp = (1.0 + (1.0 / Math.exp((x + (x * eps))))) / 2.0;
} else if (x <= 2e+261) {
tmp = (1.0 + Math.exp((x * eps))) / 2.0;
} else {
tmp = (Math.exp(-x) * (2.0 + (x * 2.0))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -2e-297: tmp = (1.0 + (1.0 / math.exp((x + (x * eps))))) / 2.0 elif x <= 2e+261: tmp = (1.0 + math.exp((x * eps))) / 2.0 else: tmp = (math.exp(-x) * (2.0 + (x * 2.0))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -2e-297) tmp = Float64(Float64(1.0 + Float64(1.0 / exp(Float64(x + Float64(x * eps))))) / 2.0); elseif (x <= 2e+261) tmp = Float64(Float64(1.0 + exp(Float64(x * eps))) / 2.0); else tmp = Float64(Float64(exp(Float64(-x)) * Float64(2.0 + Float64(x * 2.0))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -2e-297) tmp = (1.0 + (1.0 / exp((x + (x * eps))))) / 2.0; elseif (x <= 2e+261) tmp = (1.0 + exp((x * eps))) / 2.0; else tmp = (exp(-x) * (2.0 + (x * 2.0))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -2e-297], N[(N[(1.0 + N[(1.0 / N[Exp[N[(x + N[(x * eps), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 2e+261], N[(N[(1.0 + N[Exp[N[(x * eps), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[Exp[(-x)], $MachinePrecision] * N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-297}:\\
\;\;\;\;\frac{1 + \frac{1}{e^{x + x \cdot \varepsilon}}}{2}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+261}:\\
\;\;\;\;\frac{1 + e^{x \cdot \varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-x} \cdot \left(2 + x \cdot 2\right)}{2}\\
\end{array}
\end{array}
if x < -2.00000000000000008e-297Initial program 68.6%
Simplified60.1%
Taylor expanded in eps around inf 98.7%
Taylor expanded in x around 0 72.9%
Taylor expanded in eps around 0 71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in x around 0 70.9%
if -2.00000000000000008e-297 < x < 1.9999999999999999e261Initial program 70.2%
Simplified61.7%
Taylor expanded in eps around inf 98.9%
Taylor expanded in x around 0 68.2%
Taylor expanded in eps around inf 68.7%
*-commutative68.7%
Simplified68.7%
if 1.9999999999999999e261 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.2%
associate-+r+73.2%
mul-1-neg73.2%
sub-neg73.2%
+-inverses73.2%
associate-*r*73.2%
distribute-rgt-out73.2%
mul-1-neg73.2%
Simplified73.2%
Taylor expanded in eps around 0 73.2%
Final simplification69.8%
(FPCore (x eps)
:precision binary64
(if (<= x -75000000.0)
(* x (/ -1.0 (exp x)))
(if (<= x 9.4e+259)
(/ (+ 1.0 (exp (* x eps))) 2.0)
(/ (* (exp (- x)) (+ 2.0 (* x 2.0))) 2.0))))
double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / exp(x));
} else if (x <= 9.4e+259) {
tmp = (1.0 + exp((x * eps))) / 2.0;
} else {
tmp = (exp(-x) * (2.0 + (x * 2.0))) / 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 <= (-75000000.0d0)) then
tmp = x * ((-1.0d0) / exp(x))
else if (x <= 9.4d+259) then
tmp = (1.0d0 + exp((x * eps))) / 2.0d0
else
tmp = (exp(-x) * (2.0d0 + (x * 2.0d0))) / 2.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / Math.exp(x));
} else if (x <= 9.4e+259) {
tmp = (1.0 + Math.exp((x * eps))) / 2.0;
} else {
tmp = (Math.exp(-x) * (2.0 + (x * 2.0))) / 2.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -75000000.0: tmp = x * (-1.0 / math.exp(x)) elif x <= 9.4e+259: tmp = (1.0 + math.exp((x * eps))) / 2.0 else: tmp = (math.exp(-x) * (2.0 + (x * 2.0))) / 2.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -75000000.0) tmp = Float64(x * Float64(-1.0 / exp(x))); elseif (x <= 9.4e+259) tmp = Float64(Float64(1.0 + exp(Float64(x * eps))) / 2.0); else tmp = Float64(Float64(exp(Float64(-x)) * Float64(2.0 + Float64(x * 2.0))) / 2.0); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -75000000.0) tmp = x * (-1.0 / exp(x)); elseif (x <= 9.4e+259) tmp = (1.0 + exp((x * eps))) / 2.0; else tmp = (exp(-x) * (2.0 + (x * 2.0))) / 2.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -75000000.0], N[(x * N[(-1.0 / N[Exp[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.4e+259], N[(N[(1.0 + N[Exp[N[(x * eps), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[Exp[(-x)], $MachinePrecision] * N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -75000000:\\
\;\;\;\;x \cdot \frac{-1}{e^{x}}\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{+259}:\\
\;\;\;\;\frac{1 + e^{x \cdot \varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-x} \cdot \left(2 + x \cdot 2\right)}{2}\\
\end{array}
\end{array}
if x < -7.5e7Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
neg-mul-10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
mul-1-neg0.0%
mul-1-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
neg-mul-1100.0%
exp-neg100.0%
un-div-inv100.0%
Applied egg-rr100.0%
if -7.5e7 < x < 9.40000000000000015e259Initial program 63.8%
Simplified53.7%
Taylor expanded in eps around inf 98.6%
Taylor expanded in x around 0 74.4%
Taylor expanded in eps around inf 74.9%
*-commutative74.9%
Simplified74.9%
if 9.40000000000000015e259 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.2%
associate-+r+73.2%
mul-1-neg73.2%
sub-neg73.2%
+-inverses73.2%
associate-*r*73.2%
distribute-rgt-out73.2%
mul-1-neg73.2%
Simplified73.2%
Taylor expanded in eps around 0 73.2%
Final simplification78.6%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= x -75000000.0)
(* x (/ -1.0 (exp x)))
(if (<= x 1.35)
(/
(/
(*
eps
(*
t_0
(+ 1.0 (* x (+ (* x (+ 0.5 (* x -0.16666666666666666))) -1.0)))))
eps)
2.0)
(if (<= x 1.65e+83)
(/ x (exp x))
(if (<= x 5e+258)
(/ (/ (* eps (* t_0 (+ 1.0 (* x (+ (* x 0.5) -1.0))))) eps) 2.0)
0.0))))))
double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / exp(x));
} else if (x <= 1.35) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 1.65e+83) {
tmp = x / exp(x);
} else if (x <= 5e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.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 = 2.0d0 + (x * 2.0d0)
if (x <= (-75000000.0d0)) then
tmp = x * ((-1.0d0) / exp(x))
else if (x <= 1.35d0) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * (0.5d0 + (x * (-0.16666666666666666d0)))) + (-1.0d0)))))) / eps) / 2.0d0
else if (x <= 1.65d+83) then
tmp = x / exp(x)
else if (x <= 5d+258) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0)))))) / eps) / 2.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / Math.exp(x));
} else if (x <= 1.35) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 1.65e+83) {
tmp = x / Math.exp(x);
} else if (x <= 5e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = 2.0 + (x * 2.0) tmp = 0 if x <= -75000000.0: tmp = x * (-1.0 / math.exp(x)) elif x <= 1.35: tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0 elif x <= 1.65e+83: tmp = x / math.exp(x) elif x <= 5e+258: tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (x <= -75000000.0) tmp = Float64(x * Float64(-1.0 / exp(x))); elseif (x <= 1.35) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * Float64(0.5 + Float64(x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0); elseif (x <= 1.65e+83) tmp = Float64(x / exp(x)); elseif (x <= 5e+258) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0))))) / eps) / 2.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (x <= -75000000.0) tmp = x * (-1.0 / exp(x)); elseif (x <= 1.35) tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0; elseif (x <= 1.65e+83) tmp = x / exp(x); elseif (x <= 5e+258) tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -75000000.0], N[(x * N[(-1.0 / N[Exp[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * N[(0.5 + N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 1.65e+83], N[(x / N[Exp[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+258], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;x \leq -75000000:\\
\;\;\;\;x \cdot \frac{-1}{e^{x}}\\
\mathbf{elif}\;x \leq 1.35:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot -0.16666666666666666\right) + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{e^{x}}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+258}:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -7.5e7Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
neg-mul-10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
mul-1-neg0.0%
mul-1-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
neg-mul-1100.0%
exp-neg100.0%
un-div-inv100.0%
Applied egg-rr100.0%
if -7.5e7 < x < 1.3500000000000001Initial program 51.5%
Simplified29.8%
Taylor expanded in eps around 0 27.1%
associate-+r+76.1%
mul-1-neg76.1%
sub-neg76.1%
+-inverses76.1%
associate-*r*76.1%
distribute-rgt-out76.7%
mul-1-neg76.7%
Simplified76.7%
Taylor expanded in x around 0 75.8%
if 1.3500000000000001 < x < 1.64999999999999992e83Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 69.3%
associate-+r+69.3%
mul-1-neg69.3%
sub-neg69.3%
+-inverses69.3%
associate-*r*69.3%
distribute-rgt-out69.3%
mul-1-neg69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
exp-neg69.3%
un-div-inv69.3%
Applied egg-rr69.3%
if 1.64999999999999992e83 < x < 5e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 37.1%
associate-+r+37.1%
mul-1-neg37.1%
sub-neg37.1%
+-inverses37.1%
associate-*r*37.1%
distribute-rgt-out37.1%
mul-1-neg37.1%
Simplified37.1%
Taylor expanded in x around 0 64.5%
Taylor expanded in eps around 0 64.5%
if 5e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.2%
div-sub73.2%
mul-1-neg73.2%
rec-exp73.2%
+-inverses73.2%
metadata-eval73.2%
Simplified73.2%
Final simplification77.4%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= x -150000000.0)
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))
(if (<= x 1.35)
(/
(/
(*
eps
(*
t_0
(+ 1.0 (* x (+ (* x (+ 0.5 (* x -0.16666666666666666))) -1.0)))))
eps)
2.0)
(if (<= x 5e+82)
(/ x (exp x))
(if (<= x 5e+258)
(/ (/ (* eps (* t_0 (+ 1.0 (* x (+ (* x 0.5) -1.0))))) eps) 2.0)
0.0))))))
double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -150000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 1.35) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 5e+82) {
tmp = x / exp(x);
} else if (x <= 5e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.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 = 2.0d0 + (x * 2.0d0)
if (x <= (-150000000.0d0)) then
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
else if (x <= 1.35d0) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * (0.5d0 + (x * (-0.16666666666666666d0)))) + (-1.0d0)))))) / eps) / 2.0d0
else if (x <= 5d+82) then
tmp = x / exp(x)
else if (x <= 5d+258) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0)))))) / eps) / 2.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -150000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 1.35) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 5e+82) {
tmp = x / Math.exp(x);
} else if (x <= 5e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = 2.0 + (x * 2.0) tmp = 0 if x <= -150000000.0: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) elif x <= 1.35: tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0 elif x <= 5e+82: tmp = x / math.exp(x) elif x <= 5e+258: tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (x <= -150000000.0) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); elseif (x <= 1.35) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * Float64(0.5 + Float64(x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0); elseif (x <= 5e+82) tmp = Float64(x / exp(x)); elseif (x <= 5e+258) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0))))) / eps) / 2.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (x <= -150000000.0) tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); elseif (x <= 1.35) tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0; elseif (x <= 5e+82) tmp = x / exp(x); elseif (x <= 5e+258) tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -150000000.0], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * N[(0.5 + N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 5e+82], N[(x / N[Exp[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+258], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;x \leq -150000000:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.35:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot -0.16666666666666666\right) + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+82}:\\
\;\;\;\;\frac{x}{e^{x}}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+258}:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -1.5e8Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -1.5e8 < x < 1.3500000000000001Initial program 51.5%
Simplified29.8%
Taylor expanded in eps around 0 27.1%
associate-+r+76.1%
mul-1-neg76.1%
sub-neg76.1%
+-inverses76.1%
associate-*r*76.1%
distribute-rgt-out76.7%
mul-1-neg76.7%
Simplified76.7%
Taylor expanded in x around 0 75.8%
if 1.3500000000000001 < x < 5.00000000000000015e82Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 69.3%
associate-+r+69.3%
mul-1-neg69.3%
sub-neg69.3%
+-inverses69.3%
associate-*r*69.3%
distribute-rgt-out69.3%
mul-1-neg69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
exp-neg69.3%
un-div-inv69.3%
Applied egg-rr69.3%
if 5.00000000000000015e82 < x < 5e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 37.1%
associate-+r+37.1%
mul-1-neg37.1%
sub-neg37.1%
+-inverses37.1%
associate-*r*37.1%
distribute-rgt-out37.1%
mul-1-neg37.1%
Simplified37.1%
Taylor expanded in x around 0 64.5%
Taylor expanded in eps around 0 64.5%
if 5e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.2%
div-sub73.2%
mul-1-neg73.2%
rec-exp73.2%
+-inverses73.2%
metadata-eval73.2%
Simplified73.2%
Final simplification73.7%
(FPCore (x eps) :precision binary64 (if (<= x -75000000.0) (* x (/ -1.0 (exp x))) (if (<= x 3.2e+261) (/ (+ 1.0 (exp (* x eps))) 2.0) 0.0)))
double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / exp(x));
} else if (x <= 3.2e+261) {
tmp = (1.0 + exp((x * eps))) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-75000000.0d0)) then
tmp = x * ((-1.0d0) / exp(x))
else if (x <= 3.2d+261) then
tmp = (1.0d0 + exp((x * eps))) / 2.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (-1.0 / Math.exp(x));
} else if (x <= 3.2e+261) {
tmp = (1.0 + Math.exp((x * eps))) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -75000000.0: tmp = x * (-1.0 / math.exp(x)) elif x <= 3.2e+261: tmp = (1.0 + math.exp((x * eps))) / 2.0 else: tmp = 0.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -75000000.0) tmp = Float64(x * Float64(-1.0 / exp(x))); elseif (x <= 3.2e+261) tmp = Float64(Float64(1.0 + exp(Float64(x * eps))) / 2.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -75000000.0) tmp = x * (-1.0 / exp(x)); elseif (x <= 3.2e+261) tmp = (1.0 + exp((x * eps))) / 2.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -75000000.0], N[(x * N[(-1.0 / N[Exp[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+261], N[(N[(1.0 + N[Exp[N[(x * eps), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -75000000:\\
\;\;\;\;x \cdot \frac{-1}{e^{x}}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+261}:\\
\;\;\;\;\frac{1 + e^{x \cdot \varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -7.5e7Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
neg-mul-10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
mul-1-neg0.0%
mul-1-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
neg-mul-1100.0%
exp-neg100.0%
un-div-inv100.0%
Applied egg-rr100.0%
if -7.5e7 < x < 3.20000000000000021e261Initial program 63.8%
Simplified53.7%
Taylor expanded in eps around inf 98.6%
Taylor expanded in x around 0 74.4%
Taylor expanded in eps around inf 74.9%
*-commutative74.9%
Simplified74.9%
if 3.20000000000000021e261 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.2%
div-sub73.2%
mul-1-neg73.2%
rec-exp73.2%
+-inverses73.2%
metadata-eval73.2%
Simplified73.2%
Final simplification78.6%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= x -520000000.0)
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))
(if (<= x 1.6)
(/
(/
(*
eps
(*
t_0
(+ 1.0 (* x (+ (* x (+ 0.5 (* x -0.16666666666666666))) -1.0)))))
eps)
2.0)
(if (<= x 5.5e+82)
0.0
(if (<= x 2e+258)
(/ (/ (* eps (* t_0 (+ 1.0 (* x (+ (* x 0.5) -1.0))))) eps) 2.0)
0.0))))))
double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -520000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 1.6) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 5.5e+82) {
tmp = 0.0;
} else if (x <= 2e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.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 = 2.0d0 + (x * 2.0d0)
if (x <= (-520000000.0d0)) then
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
else if (x <= 1.6d0) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * (0.5d0 + (x * (-0.16666666666666666d0)))) + (-1.0d0)))))) / eps) / 2.0d0
else if (x <= 5.5d+82) then
tmp = 0.0d0
else if (x <= 2d+258) then
tmp = ((eps * (t_0 * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0)))))) / eps) / 2.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (x <= -520000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 1.6) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0;
} else if (x <= 5.5e+82) {
tmp = 0.0;
} else if (x <= 2e+258) {
tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = 2.0 + (x * 2.0) tmp = 0 if x <= -520000000.0: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) elif x <= 1.6: tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0 elif x <= 5.5e+82: tmp = 0.0 elif x <= 2e+258: tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (x <= -520000000.0) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); elseif (x <= 1.6) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * Float64(0.5 + Float64(x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0); elseif (x <= 5.5e+82) tmp = 0.0; elseif (x <= 2e+258) tmp = Float64(Float64(Float64(eps * Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0))))) / eps) / 2.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (x <= -520000000.0) tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); elseif (x <= 1.6) tmp = ((eps * (t_0 * (1.0 + (x * ((x * (0.5 + (x * -0.16666666666666666))) + -1.0))))) / eps) / 2.0; elseif (x <= 5.5e+82) tmp = 0.0; elseif (x <= 2e+258) tmp = ((eps * (t_0 * (1.0 + (x * ((x * 0.5) + -1.0))))) / eps) / 2.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -520000000.0], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * N[(0.5 + N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 5.5e+82], 0.0, If[LessEqual[x, 2e+258], N[(N[(N[(eps * N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;x \leq -520000000:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.6:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot -0.16666666666666666\right) + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+82}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+258}:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot \left(t\_0 \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\right)}{\varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -5.2e8Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -5.2e8 < x < 1.6000000000000001Initial program 51.5%
Simplified29.8%
Taylor expanded in eps around 0 27.1%
associate-+r+76.1%
mul-1-neg76.1%
sub-neg76.1%
+-inverses76.1%
associate-*r*76.1%
distribute-rgt-out76.7%
mul-1-neg76.7%
Simplified76.7%
Taylor expanded in x around 0 75.8%
if 1.6000000000000001 < x < 5.49999999999999997e82 or 2.00000000000000011e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 70.8%
div-sub70.8%
mul-1-neg70.8%
rec-exp70.8%
+-inverses70.8%
metadata-eval70.8%
Simplified70.8%
if 5.49999999999999997e82 < x < 2.00000000000000011e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 37.1%
associate-+r+37.1%
mul-1-neg37.1%
sub-neg37.1%
+-inverses37.1%
associate-*r*37.1%
distribute-rgt-out37.1%
mul-1-neg37.1%
Simplified37.1%
Taylor expanded in x around 0 64.5%
Taylor expanded in eps around 0 64.5%
Final simplification73.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (+ 2.0 (* x 2.0)) (+ 1.0 (* x (+ (* x 0.5) -1.0))))))
(if (<= x -128000000.0)
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))
(if (<= x 500.0)
(/ t_0 2.0)
(if (<= x 1.1e+83)
0.0
(if (<= x 1e+261) (/ (/ (* eps t_0) eps) 2.0) 0.0))))))
double code(double x, double eps) {
double t_0 = (2.0 + (x * 2.0)) * (1.0 + (x * ((x * 0.5) + -1.0)));
double tmp;
if (x <= -128000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 500.0) {
tmp = t_0 / 2.0;
} else if (x <= 1.1e+83) {
tmp = 0.0;
} else if (x <= 1e+261) {
tmp = ((eps * t_0) / eps) / 2.0;
} else {
tmp = 0.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 = (2.0d0 + (x * 2.0d0)) * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0))))
if (x <= (-128000000.0d0)) then
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
else if (x <= 500.0d0) then
tmp = t_0 / 2.0d0
else if (x <= 1.1d+83) then
tmp = 0.0d0
else if (x <= 1d+261) then
tmp = ((eps * t_0) / eps) / 2.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = (2.0 + (x * 2.0)) * (1.0 + (x * ((x * 0.5) + -1.0)));
double tmp;
if (x <= -128000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 500.0) {
tmp = t_0 / 2.0;
} else if (x <= 1.1e+83) {
tmp = 0.0;
} else if (x <= 1e+261) {
tmp = ((eps * t_0) / eps) / 2.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = (2.0 + (x * 2.0)) * (1.0 + (x * ((x * 0.5) + -1.0))) tmp = 0 if x <= -128000000.0: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) elif x <= 500.0: tmp = t_0 / 2.0 elif x <= 1.1e+83: tmp = 0.0 elif x <= 1e+261: tmp = ((eps * t_0) / eps) / 2.0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(Float64(2.0 + Float64(x * 2.0)) * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0)))) tmp = 0.0 if (x <= -128000000.0) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); elseif (x <= 500.0) tmp = Float64(t_0 / 2.0); elseif (x <= 1.1e+83) tmp = 0.0; elseif (x <= 1e+261) tmp = Float64(Float64(Float64(eps * t_0) / eps) / 2.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = (2.0 + (x * 2.0)) * (1.0 + (x * ((x * 0.5) + -1.0))); tmp = 0.0; if (x <= -128000000.0) tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); elseif (x <= 500.0) tmp = t_0 / 2.0; elseif (x <= 1.1e+83) tmp = 0.0; elseif (x <= 1e+261) tmp = ((eps * t_0) / eps) / 2.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -128000000.0], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 500.0], N[(t$95$0 / 2.0), $MachinePrecision], If[LessEqual[x, 1.1e+83], 0.0, If[LessEqual[x, 1e+261], N[(N[(N[(eps * t$95$0), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(2 + x \cdot 2\right) \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\\
\mathbf{if}\;x \leq -128000000:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;x \leq 500:\\
\;\;\;\;\frac{t\_0}{2}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+83}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 10^{+261}:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot t\_0}{\varepsilon}}{2}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -1.28e8Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -1.28e8 < x < 500Initial program 51.9%
Simplified30.3%
Taylor expanded in eps around 0 26.9%
associate-+r+75.6%
mul-1-neg75.6%
sub-neg75.6%
+-inverses75.6%
associate-*r*75.6%
distribute-rgt-out76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in x around 0 75.3%
Taylor expanded in eps around 0 75.3%
if 500 < x < 1.09999999999999999e83 or 9.9999999999999993e260 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 73.5%
div-sub73.5%
mul-1-neg73.5%
rec-exp73.5%
+-inverses73.5%
metadata-eval73.5%
Simplified73.5%
if 1.09999999999999999e83 < x < 9.9999999999999993e260Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 37.1%
associate-+r+37.1%
mul-1-neg37.1%
sub-neg37.1%
+-inverses37.1%
associate-*r*37.1%
distribute-rgt-out37.1%
mul-1-neg37.1%
Simplified37.1%
Taylor expanded in x around 0 64.5%
Taylor expanded in eps around 0 64.5%
Final simplification73.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (+ 1.0 (* x (+ (* x 0.5) -1.0)))))
(if (<= x -700000000.0)
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))
(if (<= x 650.0)
(/ (* (+ 2.0 (* x 2.0)) t_0) 2.0)
(if (<= x 5e+102) 0.0 (if (<= x 1e+257) (* x t_0) 0.0))))))
double code(double x, double eps) {
double t_0 = 1.0 + (x * ((x * 0.5) + -1.0));
double tmp;
if (x <= -700000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 650.0) {
tmp = ((2.0 + (x * 2.0)) * t_0) / 2.0;
} else if (x <= 5e+102) {
tmp = 0.0;
} else if (x <= 1e+257) {
tmp = x * t_0;
} else {
tmp = 0.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 * ((x * 0.5d0) + (-1.0d0)))
if (x <= (-700000000.0d0)) then
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
else if (x <= 650.0d0) then
tmp = ((2.0d0 + (x * 2.0d0)) * t_0) / 2.0d0
else if (x <= 5d+102) then
tmp = 0.0d0
else if (x <= 1d+257) then
tmp = x * t_0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = 1.0 + (x * ((x * 0.5) + -1.0));
double tmp;
if (x <= -700000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 650.0) {
tmp = ((2.0 + (x * 2.0)) * t_0) / 2.0;
} else if (x <= 5e+102) {
tmp = 0.0;
} else if (x <= 1e+257) {
tmp = x * t_0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = 1.0 + (x * ((x * 0.5) + -1.0)) tmp = 0 if x <= -700000000.0: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) elif x <= 650.0: tmp = ((2.0 + (x * 2.0)) * t_0) / 2.0 elif x <= 5e+102: tmp = 0.0 elif x <= 1e+257: tmp = x * t_0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0))) tmp = 0.0 if (x <= -700000000.0) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); elseif (x <= 650.0) tmp = Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * t_0) / 2.0); elseif (x <= 5e+102) tmp = 0.0; elseif (x <= 1e+257) tmp = Float64(x * t_0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = 1.0 + (x * ((x * 0.5) + -1.0)); tmp = 0.0; if (x <= -700000000.0) tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); elseif (x <= 650.0) tmp = ((2.0 + (x * 2.0)) * t_0) / 2.0; elseif (x <= 5e+102) tmp = 0.0; elseif (x <= 1e+257) tmp = x * t_0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -700000000.0], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 650.0], N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 5e+102], 0.0, If[LessEqual[x, 1e+257], N[(x * t$95$0), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x \cdot \left(x \cdot 0.5 + -1\right)\\
\mathbf{if}\;x \leq -700000000:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;x \leq 650:\\
\;\;\;\;\frac{\left(2 + x \cdot 2\right) \cdot t\_0}{2}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+102}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 10^{+257}:\\
\;\;\;\;x \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -7e8Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -7e8 < x < 650Initial program 51.9%
Simplified30.3%
Taylor expanded in eps around 0 26.9%
associate-+r+75.6%
mul-1-neg75.6%
sub-neg75.6%
+-inverses75.6%
associate-*r*75.6%
distribute-rgt-out76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in x around 0 75.3%
Taylor expanded in eps around 0 75.3%
if 650 < x < 5e102 or 1.00000000000000003e257 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 70.5%
div-sub70.5%
mul-1-neg70.5%
rec-exp70.5%
+-inverses70.5%
metadata-eval70.5%
Simplified70.5%
if 5e102 < x < 1.00000000000000003e257Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 35.4%
associate-+r+35.4%
mul-1-neg35.4%
sub-neg35.4%
+-inverses35.4%
associate-*r*35.4%
distribute-rgt-out35.4%
mul-1-neg35.4%
Simplified35.4%
Taylor expanded in x around inf 35.4%
Taylor expanded in x around 0 66.2%
Final simplification73.7%
(FPCore (x eps)
:precision binary64
(if (<= x -75000000.0)
(* x (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))
(if (<= x 490.0)
1.0
(if (<= x 1.12e+111)
0.0
(if (<= x 2e+255) (* x (+ 1.0 (* x (+ (* x 0.5) -1.0)))) 0.0)))))
double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 490.0) {
tmp = 1.0;
} else if (x <= 1.12e+111) {
tmp = 0.0;
} else if (x <= 2e+255) {
tmp = x * (1.0 + (x * ((x * 0.5) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-75000000.0d0)) then
tmp = x * (1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0))))))
else if (x <= 490.0d0) then
tmp = 1.0d0
else if (x <= 1.12d+111) then
tmp = 0.0d0
else if (x <= 2d+255) then
tmp = x * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -75000000.0) {
tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))));
} else if (x <= 490.0) {
tmp = 1.0;
} else if (x <= 1.12e+111) {
tmp = 0.0;
} else if (x <= 2e+255) {
tmp = x * (1.0 + (x * ((x * 0.5) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -75000000.0: tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))) elif x <= 490.0: tmp = 1.0 elif x <= 1.12e+111: tmp = 0.0 elif x <= 2e+255: tmp = x * (1.0 + (x * ((x * 0.5) + -1.0))) else: tmp = 0.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -75000000.0) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))))); elseif (x <= 490.0) tmp = 1.0; elseif (x <= 1.12e+111) tmp = 0.0; elseif (x <= 2e+255) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -75000000.0) tmp = x * (1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))))); elseif (x <= 490.0) tmp = 1.0; elseif (x <= 1.12e+111) tmp = 0.0; elseif (x <= 2e+255) tmp = x * (1.0 + (x * ((x * 0.5) + -1.0))); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -75000000.0], N[(x * N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 490.0], 1.0, If[LessEqual[x, 1.12e+111], 0.0, If[LessEqual[x, 2e+255], N[(x * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -75000000:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;x \leq 490:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+111}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+255}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -7.5e7Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -7.5e7 < x < 490Initial program 51.9%
Simplified30.3%
Taylor expanded in eps around 0 26.9%
associate-+r+75.6%
mul-1-neg75.6%
sub-neg75.6%
+-inverses75.6%
associate-*r*75.6%
distribute-rgt-out76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in x around 0 75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in eps around 0 75.1%
if 490 < x < 1.11999999999999995e111 or 1.99999999999999998e255 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 70.5%
div-sub70.5%
mul-1-neg70.5%
rec-exp70.5%
+-inverses70.5%
metadata-eval70.5%
Simplified70.5%
if 1.11999999999999995e111 < x < 1.99999999999999998e255Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 35.4%
associate-+r+35.4%
mul-1-neg35.4%
sub-neg35.4%
+-inverses35.4%
associate-*r*35.4%
distribute-rgt-out35.4%
mul-1-neg35.4%
Simplified35.4%
Taylor expanded in x around inf 35.4%
Taylor expanded in x around 0 66.2%
Final simplification73.5%
(FPCore (x eps)
:precision binary64
(if (<= x -1.15e+175)
(* x (+ x 1.0))
(if (<= x 1.0)
(/ (- 2.0 (* x (+ eps 2.0))) 2.0)
(if (<= x 4e+101)
0.0
(if (<= x 1.46e+258) (* x (+ 1.0 (* x (+ (* x 0.5) -1.0)))) 0.0)))))
double code(double x, double eps) {
double tmp;
if (x <= -1.15e+175) {
tmp = x * (x + 1.0);
} else if (x <= 1.0) {
tmp = (2.0 - (x * (eps + 2.0))) / 2.0;
} else if (x <= 4e+101) {
tmp = 0.0;
} else if (x <= 1.46e+258) {
tmp = x * (1.0 + (x * ((x * 0.5) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.15d+175)) then
tmp = x * (x + 1.0d0)
else if (x <= 1.0d0) then
tmp = (2.0d0 - (x * (eps + 2.0d0))) / 2.0d0
else if (x <= 4d+101) then
tmp = 0.0d0
else if (x <= 1.46d+258) then
tmp = x * (1.0d0 + (x * ((x * 0.5d0) + (-1.0d0))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.15e+175) {
tmp = x * (x + 1.0);
} else if (x <= 1.0) {
tmp = (2.0 - (x * (eps + 2.0))) / 2.0;
} else if (x <= 4e+101) {
tmp = 0.0;
} else if (x <= 1.46e+258) {
tmp = x * (1.0 + (x * ((x * 0.5) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.15e+175: tmp = x * (x + 1.0) elif x <= 1.0: tmp = (2.0 - (x * (eps + 2.0))) / 2.0 elif x <= 4e+101: tmp = 0.0 elif x <= 1.46e+258: tmp = x * (1.0 + (x * ((x * 0.5) + -1.0))) else: tmp = 0.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.15e+175) tmp = Float64(x * Float64(x + 1.0)); elseif (x <= 1.0) tmp = Float64(Float64(2.0 - Float64(x * Float64(eps + 2.0))) / 2.0); elseif (x <= 4e+101) tmp = 0.0; elseif (x <= 1.46e+258) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(Float64(x * 0.5) + -1.0)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.15e+175) tmp = x * (x + 1.0); elseif (x <= 1.0) tmp = (2.0 - (x * (eps + 2.0))) / 2.0; elseif (x <= 4e+101) tmp = 0.0; elseif (x <= 1.46e+258) tmp = x * (1.0 + (x * ((x * 0.5) + -1.0))); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.15e+175], N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0], N[(N[(2.0 - N[(x * N[(eps + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 4e+101], 0.0, If[LessEqual[x, 1.46e+258], N[(x * N[(1.0 + N[(x * N[(N[(x * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \left(x + 1\right)\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;\frac{2 - x \cdot \left(\varepsilon + 2\right)}{2}\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+101}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.46 \cdot 10^{+258}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot 0.5 + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -1.15e175Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 0.0%
associate-+r+0.0%
mul-1-neg0.0%
sub-neg0.0%
+-inverses0.0%
associate-*r*0.0%
distribute-rgt-out0.0%
mul-1-neg0.0%
Simplified0.0%
Taylor expanded in x around inf 0.0%
pow10.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
Applied egg-rr1.6%
unpow11.6%
Simplified1.6%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
Simplified100.0%
if -1.15e175 < x < 1Initial program 56.4%
Simplified44.2%
Taylor expanded in eps around inf 98.3%
Taylor expanded in x around 0 79.7%
Taylor expanded in eps around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
Simplified79.9%
Taylor expanded in x around 0 68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
if 1 < x < 3.9999999999999999e101 or 1.46e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 68.2%
div-sub68.2%
mul-1-neg68.2%
rec-exp68.2%
+-inverses68.2%
metadata-eval68.2%
Simplified68.2%
if 3.9999999999999999e101 < x < 1.46e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 35.4%
associate-+r+35.4%
mul-1-neg35.4%
sub-neg35.4%
+-inverses35.4%
associate-*r*35.4%
distribute-rgt-out35.4%
mul-1-neg35.4%
Simplified35.4%
Taylor expanded in x around inf 35.4%
Taylor expanded in x around 0 66.2%
Final simplification71.0%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (+ x 1.0))))
(if (<= x -1.15e+175)
t_0
(if (<= x 1.0)
(/ (- 2.0 (* x (+ eps 2.0))) 2.0)
(if (<= x 1.7e+144) 0.0 (if (<= x 5e+258) t_0 0.0))))))
double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -1.15e+175) {
tmp = t_0;
} else if (x <= 1.0) {
tmp = (2.0 - (x * (eps + 2.0))) / 2.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 5e+258) {
tmp = t_0;
} else {
tmp = 0.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 * (x + 1.0d0)
if (x <= (-1.15d+175)) then
tmp = t_0
else if (x <= 1.0d0) then
tmp = (2.0d0 - (x * (eps + 2.0d0))) / 2.0d0
else if (x <= 1.7d+144) then
tmp = 0.0d0
else if (x <= 5d+258) then
tmp = t_0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -1.15e+175) {
tmp = t_0;
} else if (x <= 1.0) {
tmp = (2.0 - (x * (eps + 2.0))) / 2.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 5e+258) {
tmp = t_0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = x * (x + 1.0) tmp = 0 if x <= -1.15e+175: tmp = t_0 elif x <= 1.0: tmp = (2.0 - (x * (eps + 2.0))) / 2.0 elif x <= 1.7e+144: tmp = 0.0 elif x <= 5e+258: tmp = t_0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(x * Float64(x + 1.0)) tmp = 0.0 if (x <= -1.15e+175) tmp = t_0; elseif (x <= 1.0) tmp = Float64(Float64(2.0 - Float64(x * Float64(eps + 2.0))) / 2.0); elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 5e+258) tmp = t_0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x + 1.0); tmp = 0.0; if (x <= -1.15e+175) tmp = t_0; elseif (x <= 1.0) tmp = (2.0 - (x * (eps + 2.0))) / 2.0; elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 5e+258) tmp = t_0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+175], t$95$0, If[LessEqual[x, 1.0], N[(N[(2.0 - N[(x * N[(eps + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 1.7e+144], 0.0, If[LessEqual[x, 5e+258], t$95$0, 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 1\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;\frac{2 - x \cdot \left(\varepsilon + 2\right)}{2}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+144}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+258}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -1.15e175 or 1.7e144 < x < 5e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 18.6%
associate-+r+18.6%
mul-1-neg18.6%
sub-neg18.6%
+-inverses18.6%
associate-*r*18.6%
distribute-rgt-out18.6%
mul-1-neg18.6%
Simplified18.6%
Taylor expanded in x around inf 18.6%
pow118.6%
add-sqr-sqrt0.0%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod38.3%
add-sqr-sqrt39.0%
Applied egg-rr39.0%
unpow139.0%
Simplified39.0%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
Simplified80.5%
if -1.15e175 < x < 1Initial program 56.4%
Simplified44.2%
Taylor expanded in eps around inf 98.3%
Taylor expanded in x around 0 79.7%
Taylor expanded in eps around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
Simplified79.9%
Taylor expanded in x around 0 68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
if 1 < x < 1.7e144 or 5e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 66.2%
div-sub66.2%
mul-1-neg66.2%
rec-exp66.3%
+-inverses66.3%
metadata-eval66.3%
Simplified66.3%
Final simplification70.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (+ x 1.0))))
(if (<= x -6.5e+128)
t_0
(if (<= x 550.0)
(/ (/ (* eps 2.0) eps) 2.0)
(if (<= x 1.7e+144) 0.0 (if (<= x 1.5e+258) t_0 0.0))))))
double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -6.5e+128) {
tmp = t_0;
} else if (x <= 550.0) {
tmp = ((eps * 2.0) / eps) / 2.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 1.5e+258) {
tmp = t_0;
} else {
tmp = 0.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 * (x + 1.0d0)
if (x <= (-6.5d+128)) then
tmp = t_0
else if (x <= 550.0d0) then
tmp = ((eps * 2.0d0) / eps) / 2.0d0
else if (x <= 1.7d+144) then
tmp = 0.0d0
else if (x <= 1.5d+258) then
tmp = t_0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -6.5e+128) {
tmp = t_0;
} else if (x <= 550.0) {
tmp = ((eps * 2.0) / eps) / 2.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 1.5e+258) {
tmp = t_0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = x * (x + 1.0) tmp = 0 if x <= -6.5e+128: tmp = t_0 elif x <= 550.0: tmp = ((eps * 2.0) / eps) / 2.0 elif x <= 1.7e+144: tmp = 0.0 elif x <= 1.5e+258: tmp = t_0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(x * Float64(x + 1.0)) tmp = 0.0 if (x <= -6.5e+128) tmp = t_0; elseif (x <= 550.0) tmp = Float64(Float64(Float64(eps * 2.0) / eps) / 2.0); elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 1.5e+258) tmp = t_0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x + 1.0); tmp = 0.0; if (x <= -6.5e+128) tmp = t_0; elseif (x <= 550.0) tmp = ((eps * 2.0) / eps) / 2.0; elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 1.5e+258) tmp = t_0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.5e+128], t$95$0, If[LessEqual[x, 550.0], N[(N[(N[(eps * 2.0), $MachinePrecision] / eps), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, 1.7e+144], 0.0, If[LessEqual[x, 1.5e+258], t$95$0, 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 1\right)\\
\mathbf{if}\;x \leq -6.5 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 550:\\
\;\;\;\;\frac{\frac{\varepsilon \cdot 2}{\varepsilon}}{2}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+144}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+258}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -6.5000000000000003e128 or 1.7e144 < x < 1.5e258Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 17.9%
associate-+r+17.9%
mul-1-neg17.9%
sub-neg17.9%
+-inverses17.9%
associate-*r*17.9%
distribute-rgt-out17.9%
mul-1-neg17.9%
Simplified17.9%
Taylor expanded in x around inf 17.9%
pow117.9%
add-sqr-sqrt0.0%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod36.8%
add-sqr-sqrt37.5%
Applied egg-rr37.5%
unpow137.5%
Simplified37.5%
Taylor expanded in x around 0 81.2%
+-commutative81.2%
Simplified81.2%
if -6.5000000000000003e128 < x < 550Initial program 56.1%
Simplified36.4%
Taylor expanded in eps around 0 24.5%
associate-+r+68.9%
mul-1-neg68.9%
sub-neg68.9%
+-inverses68.9%
associate-*r*68.9%
distribute-rgt-out69.5%
mul-1-neg69.5%
Simplified69.5%
Taylor expanded in x around 0 69.3%
*-commutative69.3%
Simplified69.3%
+-lft-identity69.3%
Applied egg-rr69.3%
if 550 < x < 1.7e144 or 1.5e258 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 68.2%
div-sub68.2%
mul-1-neg68.2%
rec-exp68.2%
+-inverses68.2%
metadata-eval68.2%
Simplified68.2%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (+ x 1.0))))
(if (<= x -75000000.0)
t_0
(if (<= x 510.0)
1.0
(if (<= x 1.7e+144) 0.0 (if (<= x 5e+260) t_0 0.0))))))
double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -75000000.0) {
tmp = t_0;
} else if (x <= 510.0) {
tmp = 1.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 5e+260) {
tmp = t_0;
} else {
tmp = 0.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 * (x + 1.0d0)
if (x <= (-75000000.0d0)) then
tmp = t_0
else if (x <= 510.0d0) then
tmp = 1.0d0
else if (x <= 1.7d+144) then
tmp = 0.0d0
else if (x <= 5d+260) then
tmp = t_0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x + 1.0);
double tmp;
if (x <= -75000000.0) {
tmp = t_0;
} else if (x <= 510.0) {
tmp = 1.0;
} else if (x <= 1.7e+144) {
tmp = 0.0;
} else if (x <= 5e+260) {
tmp = t_0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): t_0 = x * (x + 1.0) tmp = 0 if x <= -75000000.0: tmp = t_0 elif x <= 510.0: tmp = 1.0 elif x <= 1.7e+144: tmp = 0.0 elif x <= 5e+260: tmp = t_0 else: tmp = 0.0 return tmp
function code(x, eps) t_0 = Float64(x * Float64(x + 1.0)) tmp = 0.0 if (x <= -75000000.0) tmp = t_0; elseif (x <= 510.0) tmp = 1.0; elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 5e+260) tmp = t_0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x + 1.0); tmp = 0.0; if (x <= -75000000.0) tmp = t_0; elseif (x <= 510.0) tmp = 1.0; elseif (x <= 1.7e+144) tmp = 0.0; elseif (x <= 5e+260) tmp = t_0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -75000000.0], t$95$0, If[LessEqual[x, 510.0], 1.0, If[LessEqual[x, 1.7e+144], 0.0, If[LessEqual[x, 5e+260], t$95$0, 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 1\right)\\
\mathbf{if}\;x \leq -75000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 510:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+144}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+260}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -7.5e7 or 1.7e144 < x < 4.9999999999999996e260Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 13.9%
associate-+r+13.9%
mul-1-neg13.9%
sub-neg13.9%
+-inverses13.9%
associate-*r*13.9%
distribute-rgt-out13.9%
mul-1-neg13.9%
Simplified13.9%
Taylor expanded in x around inf 13.9%
pow113.9%
add-sqr-sqrt0.0%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod28.6%
add-sqr-sqrt29.5%
Applied egg-rr29.5%
unpow129.5%
Simplified29.5%
Taylor expanded in x around 0 64.1%
+-commutative64.1%
Simplified64.1%
if -7.5e7 < x < 510Initial program 51.9%
Simplified30.3%
Taylor expanded in eps around 0 26.9%
associate-+r+75.6%
mul-1-neg75.6%
sub-neg75.6%
+-inverses75.6%
associate-*r*75.6%
distribute-rgt-out76.2%
mul-1-neg76.2%
Simplified76.2%
Taylor expanded in x around 0 75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in eps around 0 75.1%
if 510 < x < 1.7e144 or 4.9999999999999996e260 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 68.2%
div-sub68.2%
mul-1-neg68.2%
rec-exp68.2%
+-inverses68.2%
metadata-eval68.2%
Simplified68.2%
(FPCore (x eps) :precision binary64 (if (<= x 610.0) 1.0 0.0))
double code(double x, double eps) {
double tmp;
if (x <= 610.0) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= 610.0d0) then
tmp = 1.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= 610.0) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= 610.0: tmp = 1.0 else: tmp = 0.0 return tmp
function code(x, eps) tmp = 0.0 if (x <= 610.0) tmp = 1.0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= 610.0) tmp = 1.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, 610.0], 1.0, 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 610:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 610Initial program 61.5%
Simplified44.3%
Taylor expanded in eps around 0 21.5%
associate-+r+60.4%
mul-1-neg60.4%
sub-neg60.4%
+-inverses60.4%
associate-*r*60.4%
distribute-rgt-out60.9%
mul-1-neg60.9%
Simplified60.9%
Taylor expanded in x around 0 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in eps around 0 60.6%
if 610 < x Initial program 100.0%
Simplified100.0%
Taylor expanded in eps around 0 52.4%
div-sub52.4%
mul-1-neg52.4%
rec-exp52.4%
+-inverses52.4%
metadata-eval52.4%
Simplified52.4%
(FPCore (x eps) :precision binary64 0.0)
double code(double x, double eps) {
return 0.0;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = 0.0d0
end function
public static double code(double x, double eps) {
return 0.0;
}
def code(x, eps): return 0.0
function code(x, eps) return 0.0 end
function tmp = code(x, eps) tmp = 0.0; end
code[x_, eps_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 70.9%
Simplified62.7%
Taylor expanded in eps around 0 14.3%
div-sub14.3%
mul-1-neg14.3%
rec-exp14.3%
+-inverses14.6%
metadata-eval14.6%
Simplified14.6%
herbie shell --seed 2024145
(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))