
(FPCore (x) :precision binary64 (exp (- (- 1.0 (* x x)))))
double code(double x) {
return exp(-(1.0 - (x * x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = exp(-(1.0d0 - (x * x)))
end function
public static double code(double x) {
return Math.exp(-(1.0 - (x * x)));
}
def code(x): return math.exp(-(1.0 - (x * x)))
function code(x) return exp(Float64(-Float64(1.0 - Float64(x * x)))) end
function tmp = code(x) tmp = exp(-(1.0 - (x * x))); end
code[x_] := N[Exp[(-N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]
\begin{array}{l}
\\
e^{-\left(1 - x \cdot x\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (exp (- (- 1.0 (* x x)))))
double code(double x) {
return exp(-(1.0 - (x * x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = exp(-(1.0d0 - (x * x)))
end function
public static double code(double x) {
return Math.exp(-(1.0 - (x * x)));
}
def code(x): return math.exp(-(1.0 - (x * x)))
function code(x) return exp(Float64(-Float64(1.0 - Float64(x * x)))) end
function tmp = code(x) tmp = exp(-(1.0 - (x * x))); end
code[x_] := N[Exp[(-N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]
\begin{array}{l}
\\
e^{-\left(1 - x \cdot x\right)}
\end{array}
(FPCore (x) :precision binary64 (exp (+ (* x x) -1.0)))
double code(double x) {
return exp(((x * x) + -1.0));
}
real(8) function code(x)
real(8), intent (in) :: x
code = exp(((x * x) + (-1.0d0)))
end function
public static double code(double x) {
return Math.exp(((x * x) + -1.0));
}
def code(x): return math.exp(((x * x) + -1.0))
function code(x) return exp(Float64(Float64(x * x) + -1.0)) end
function tmp = code(x) tmp = exp(((x * x) + -1.0)); end
code[x_] := N[Exp[N[(N[(x * x), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{x \cdot x + -1}
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= (* x x) 0.001)
(*
(/ 1.0 E)
(+
1.0
(*
x
(*
x
(+
1.0
(*
x
(/
(* x (+ 0.125 (* (* t_0 t_0) 0.004629629629629629)))
(+ 0.25 (* x (* x -0.08333333333333333))))))))))
(exp (* x x)))))
double code(double x) {
double t_0 = x * (x * x);
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * ((x * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (x * (x * -0.08333333333333333)))))))));
} else {
tmp = exp((x * x));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * x);
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * ((x * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (x * (x * -0.08333333333333333)))))))));
} else {
tmp = Math.exp((x * x));
}
return tmp;
}
def code(x): t_0 = x * (x * x) tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * ((x * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (x * (x * -0.08333333333333333))))))))) else: tmp = math.exp((x * x)) return tmp
function code(x) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(Float64(x * Float64(0.125 + Float64(Float64(t_0 * t_0) * 0.004629629629629629))) / Float64(0.25 + Float64(x * Float64(x * -0.08333333333333333)))))))))); else tmp = exp(Float64(x * x)); end return tmp end
function tmp_2 = code(x) t_0 = x * (x * x); tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * ((x * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (x * (x * -0.08333333333333333))))))))); else tmp = exp((x * x)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(N[(x * N[(0.125 + N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(x * N[(x * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \frac{x \cdot \left(0.125 + \left(t\_0 \cdot t\_0\right) \cdot 0.004629629629629629\right)}{0.25 + x \cdot \left(x \cdot -0.08333333333333333\right)}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{x \cdot x}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified99.9%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in x around 0
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
unpow2N/A
*-lowering-*.f6499.4%
Simplified99.4%
Final simplification99.6%
(FPCore (x)
:precision binary64
(let* ((t_0 (* (* x x) (* x (* x (* x x)))))
(t_1 (* x (* x 0.16666666666666666))))
(if (<= (* x x) 4e+100)
(*
(/ 1.0 E)
(+
1.0
(*
x
(*
x
(+
1.0
(*
x
(/
(*
(- 0.015625 (* 2.143347050754458e-5 (* t_0 t_0)))
(/ x (+ 0.25 (* t_1 (+ t_1 -0.5)))))
(+ 0.125 (* t_0 -0.004629629629629629)))))))))
(* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E)))))
double code(double x) {
double t_0 = (x * x) * (x * (x * (x * x)));
double t_1 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 4e+100) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * (((0.015625 - (2.143347050754458e-5 * (t_0 * t_0))) * (x / (0.25 + (t_1 * (t_1 + -0.5))))) / (0.125 + (t_0 * -0.004629629629629629))))))));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double t_0 = (x * x) * (x * (x * (x * x)));
double t_1 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 4e+100) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * (((0.015625 - (2.143347050754458e-5 * (t_0 * t_0))) * (x / (0.25 + (t_1 * (t_1 + -0.5))))) / (0.125 + (t_0 * -0.004629629629629629))))))));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): t_0 = (x * x) * (x * (x * (x * x))) t_1 = x * (x * 0.16666666666666666) tmp = 0 if (x * x) <= 4e+100: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * (((0.015625 - (2.143347050754458e-5 * (t_0 * t_0))) * (x / (0.25 + (t_1 * (t_1 + -0.5))))) / (0.125 + (t_0 * -0.004629629629629629)))))))) else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) t_0 = Float64(Float64(x * x) * Float64(x * Float64(x * Float64(x * x)))) t_1 = Float64(x * Float64(x * 0.16666666666666666)) tmp = 0.0 if (Float64(x * x) <= 4e+100) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(Float64(Float64(0.015625 - Float64(2.143347050754458e-5 * Float64(t_0 * t_0))) * Float64(x / Float64(0.25 + Float64(t_1 * Float64(t_1 + -0.5))))) / Float64(0.125 + Float64(t_0 * -0.004629629629629629))))))))); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) t_0 = (x * x) * (x * (x * (x * x))); t_1 = x * (x * 0.16666666666666666); tmp = 0.0; if ((x * x) <= 4e+100) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * (((0.015625 - (2.143347050754458e-5 * (t_0 * t_0))) * (x / (0.25 + (t_1 * (t_1 + -0.5))))) / (0.125 + (t_0 * -0.004629629629629629)))))))); else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 4e+100], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(N[(N[(0.015625 - N[(2.143347050754458e-5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(0.25 + N[(t$95$1 * N[(t$95$1 + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.125 + N[(t$95$0 * -0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\\
t_1 := x \cdot \left(x \cdot 0.16666666666666666\right)\\
\mathbf{if}\;x \cdot x \leq 4 \cdot 10^{+100}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \frac{\left(0.015625 - 2.143347050754458 \cdot 10^{-5} \cdot \left(t\_0 \cdot t\_0\right)\right) \cdot \frac{x}{0.25 + t\_1 \cdot \left(t\_1 + -0.5\right)}}{0.125 + t\_0 \cdot -0.004629629629629629}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 4.00000000000000006e100Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.0%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr87.5%
Applied egg-rr93.4%
if 4.00000000000000006e100 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified99.2%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified100.0%
Final simplification96.2%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x (+ (* x (* x 0.16666666666666666)) 0.5))))
(t_1 (- -1.0 t_0)))
(if (<= (* x x) 4e+100)
(/
(* (/ 1.0 E) (+ 1.0 (* (* x x) (* (* (* x x) (+ 1.0 t_0)) t_1))))
(+ 1.0 (* (* x x) t_1)))
(* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E)))))
double code(double x) {
double t_0 = x * (x * ((x * (x * 0.16666666666666666)) + 0.5));
double t_1 = -1.0 - t_0;
double tmp;
if ((x * x) <= 4e+100) {
tmp = ((1.0 / ((double) M_E)) * (1.0 + ((x * x) * (((x * x) * (1.0 + t_0)) * t_1)))) / (1.0 + ((x * x) * t_1));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * ((x * (x * 0.16666666666666666)) + 0.5));
double t_1 = -1.0 - t_0;
double tmp;
if ((x * x) <= 4e+100) {
tmp = ((1.0 / Math.E) * (1.0 + ((x * x) * (((x * x) * (1.0 + t_0)) * t_1)))) / (1.0 + ((x * x) * t_1));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): t_0 = x * (x * ((x * (x * 0.16666666666666666)) + 0.5)) t_1 = -1.0 - t_0 tmp = 0 if (x * x) <= 4e+100: tmp = ((1.0 / math.e) * (1.0 + ((x * x) * (((x * x) * (1.0 + t_0)) * t_1)))) / (1.0 + ((x * x) * t_1)) else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) t_0 = Float64(x * Float64(x * Float64(Float64(x * Float64(x * 0.16666666666666666)) + 0.5))) t_1 = Float64(-1.0 - t_0) tmp = 0.0 if (Float64(x * x) <= 4e+100) tmp = Float64(Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(Float64(x * x) * Float64(1.0 + t_0)) * t_1)))) / Float64(1.0 + Float64(Float64(x * x) * t_1))); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x * ((x * (x * 0.16666666666666666)) + 0.5)); t_1 = -1.0 - t_0; tmp = 0.0; if ((x * x) <= 4e+100) tmp = ((1.0 / 2.71828182845904523536) * (1.0 + ((x * x) * (((x * x) * (1.0 + t_0)) * t_1)))) / (1.0 + ((x * x) * t_1)); else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x * N[(N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 4e+100], N[(N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(x * x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 0.16666666666666666\right) + 0.5\right)\right)\\
t_1 := -1 - t\_0\\
\mathbf{if}\;x \cdot x \leq 4 \cdot 10^{+100}:\\
\;\;\;\;\frac{\frac{1}{e} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(\left(\left(x \cdot x\right) \cdot \left(1 + t\_0\right)\right) \cdot t\_1\right)\right)}{1 + \left(x \cdot x\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 4.00000000000000006e100Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.0%
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr93.3%
if 4.00000000000000006e100 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified99.2%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified100.0%
Final simplification96.2%
(FPCore (x)
:precision binary64
(let* ((t_0 (+ 1.0 (* (* x x) (+ (* x (* x 0.16666666666666666)) 0.5))))
(t_1 (* (* x x) t_0)))
(if (<= (* x x) 4e+100)
(/ (/ (+ -1.0 (* (* x x) (* t_0 t_1))) (+ -1.0 t_1)) E)
(* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E)))))
double code(double x) {
double t_0 = 1.0 + ((x * x) * ((x * (x * 0.16666666666666666)) + 0.5));
double t_1 = (x * x) * t_0;
double tmp;
if ((x * x) <= 4e+100) {
tmp = ((-1.0 + ((x * x) * (t_0 * t_1))) / (-1.0 + t_1)) / ((double) M_E);
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double t_0 = 1.0 + ((x * x) * ((x * (x * 0.16666666666666666)) + 0.5));
double t_1 = (x * x) * t_0;
double tmp;
if ((x * x) <= 4e+100) {
tmp = ((-1.0 + ((x * x) * (t_0 * t_1))) / (-1.0 + t_1)) / Math.E;
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): t_0 = 1.0 + ((x * x) * ((x * (x * 0.16666666666666666)) + 0.5)) t_1 = (x * x) * t_0 tmp = 0 if (x * x) <= 4e+100: tmp = ((-1.0 + ((x * x) * (t_0 * t_1))) / (-1.0 + t_1)) / math.e else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) t_0 = Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(x * Float64(x * 0.16666666666666666)) + 0.5))) t_1 = Float64(Float64(x * x) * t_0) tmp = 0.0 if (Float64(x * x) <= 4e+100) tmp = Float64(Float64(Float64(-1.0 + Float64(Float64(x * x) * Float64(t_0 * t_1))) / Float64(-1.0 + t_1)) / exp(1)); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) t_0 = 1.0 + ((x * x) * ((x * (x * 0.16666666666666666)) + 0.5)); t_1 = (x * x) * t_0; tmp = 0.0; if ((x * x) <= 4e+100) tmp = ((-1.0 + ((x * x) * (t_0 * t_1))) / (-1.0 + t_1)) / 2.71828182845904523536; else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 4e+100], N[(N[(N[(-1.0 + N[(N[(x * x), $MachinePrecision] * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot 0.16666666666666666\right) + 0.5\right)\\
t_1 := \left(x \cdot x\right) \cdot t\_0\\
\mathbf{if}\;x \cdot x \leq 4 \cdot 10^{+100}:\\
\;\;\;\;\frac{\frac{-1 + \left(x \cdot x\right) \cdot \left(t\_0 \cdot t\_1\right)}{-1 + t\_1}}{e}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 4.00000000000000006e100Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.0%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr85.0%
+-commutativeN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr93.3%
if 4.00000000000000006e100 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified99.2%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified100.0%
Final simplification96.2%
(FPCore (x)
:precision binary64
(let* ((t_0 (+ (* x (* x 0.16666666666666666)) 0.5)))
(if (<= (* x x) 5e+153)
(/
(+
1.0
(/
(* (* x x) (- 1.0 (* t_0 (* (* x (* x (* x x))) t_0))))
(- 1.0 (* (* x x) t_0))))
E)
(* (* x x) (* 0.5 (/ (* x x) E))))))
double code(double x) {
double t_0 = (x * (x * 0.16666666666666666)) + 0.5;
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 + (((x * x) * (1.0 - (t_0 * ((x * (x * (x * x))) * t_0)))) / (1.0 - ((x * x) * t_0)))) / ((double) M_E);
} else {
tmp = (x * x) * (0.5 * ((x * x) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double t_0 = (x * (x * 0.16666666666666666)) + 0.5;
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 + (((x * x) * (1.0 - (t_0 * ((x * (x * (x * x))) * t_0)))) / (1.0 - ((x * x) * t_0)))) / Math.E;
} else {
tmp = (x * x) * (0.5 * ((x * x) / Math.E));
}
return tmp;
}
def code(x): t_0 = (x * (x * 0.16666666666666666)) + 0.5 tmp = 0 if (x * x) <= 5e+153: tmp = (1.0 + (((x * x) * (1.0 - (t_0 * ((x * (x * (x * x))) * t_0)))) / (1.0 - ((x * x) * t_0)))) / math.e else: tmp = (x * x) * (0.5 * ((x * x) / math.e)) return tmp
function code(x) t_0 = Float64(Float64(x * Float64(x * 0.16666666666666666)) + 0.5) tmp = 0.0 if (Float64(x * x) <= 5e+153) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 - Float64(t_0 * Float64(Float64(x * Float64(x * Float64(x * x))) * t_0)))) / Float64(1.0 - Float64(Float64(x * x) * t_0)))) / exp(1)); else tmp = Float64(Float64(x * x) * Float64(0.5 * Float64(Float64(x * x) / exp(1)))); end return tmp end
function tmp_2 = code(x) t_0 = (x * (x * 0.16666666666666666)) + 0.5; tmp = 0.0; if ((x * x) <= 5e+153) tmp = (1.0 + (((x * x) * (1.0 - (t_0 * ((x * (x * (x * x))) * t_0)))) / (1.0 - ((x * x) * t_0)))) / 2.71828182845904523536; else tmp = (x * x) * (0.5 * ((x * x) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+153], N[(N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 - N[(t$95$0 * N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.5 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot 0.16666666666666666\right) + 0.5\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\frac{1 + \frac{\left(x \cdot x\right) \cdot \left(1 - t\_0 \cdot \left(\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot t\_0\right)\right)}{1 - \left(x \cdot x\right) \cdot t\_0}}{e}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(0.5 \cdot \frac{x \cdot x}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000018e153Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.6%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr85.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr91.4%
if 5.00000000000000018e153 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in x around inf
exp-1-eN/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
exp-1-eN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
exp-1-eN/A
associate-*l/N/A
*-lft-identityN/A
exp-1-eN/A
Simplified100.0%
Final simplification94.7%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (* x (* x 0.16666666666666666))))
(if (<= (* x x) 5e+153)
(*
(/ 1.0 E)
(+
1.0
(*
x
(*
x
(+
1.0
(/
(* (* x x) (+ 0.125 (* (* t_0 t_0) 0.004629629629629629)))
(+ 0.25 (* t_1 (- t_1 0.5)))))))))
(* (* x x) (* 0.5 (/ (* x x) E))))))
double code(double x) {
double t_0 = x * (x * x);
double t_1 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (((x * x) * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (t_1 * (t_1 - 0.5))))))));
} else {
tmp = (x * x) * (0.5 * ((x * x) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * x);
double t_1 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (((x * x) * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (t_1 * (t_1 - 0.5))))))));
} else {
tmp = (x * x) * (0.5 * ((x * x) / Math.E));
}
return tmp;
}
def code(x): t_0 = x * (x * x) t_1 = x * (x * 0.16666666666666666) tmp = 0 if (x * x) <= 5e+153: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (((x * x) * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (t_1 * (t_1 - 0.5)))))))) else: tmp = (x * x) * (0.5 * ((x * x) / math.e)) return tmp
function code(x) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(x * Float64(x * 0.16666666666666666)) tmp = 0.0 if (Float64(x * x) <= 5e+153) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(0.125 + Float64(Float64(t_0 * t_0) * 0.004629629629629629))) / Float64(0.25 + Float64(t_1 * Float64(t_1 - 0.5))))))))); else tmp = Float64(Float64(x * x) * Float64(0.5 * Float64(Float64(x * x) / exp(1)))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x * x); t_1 = x * (x * 0.16666666666666666); tmp = 0.0; if ((x * x) <= 5e+153) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (((x * x) * (0.125 + ((t_0 * t_0) * 0.004629629629629629))) / (0.25 + (t_1 * (t_1 - 0.5)))))))); else tmp = (x * x) * (0.5 * ((x * x) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+153], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(0.125 + N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(t$95$1 * N[(t$95$1 - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.5 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := x \cdot \left(x \cdot 0.16666666666666666\right)\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(0.125 + \left(t\_0 \cdot t\_0\right) \cdot 0.004629629629629629\right)}{0.25 + t\_1 \cdot \left(t\_1 - 0.5\right)}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(0.5 \cdot \frac{x \cdot x}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000018e153Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.6%
associate-*r*N/A
flip3-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr89.0%
if 5.00000000000000018e153 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in x around inf
exp-1-eN/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
exp-1-eN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
exp-1-eN/A
associate-*l/N/A
*-lft-identityN/A
exp-1-eN/A
Simplified100.0%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x 0.16666666666666666))))
(if (<= (* x x) 5e+153)
(/
(+
1.0
(*
(* x x)
(+
1.0
(/
(*
x
(*
x
(+
0.125
(* (* x x) (* x (* x (* (* x x) 0.004629629629629629)))))))
(+ 0.25 (* t_0 (+ t_0 -0.5)))))))
E)
(* (* x x) (* 0.5 (/ (* x x) E))))))
double code(double x) {
double t_0 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 + ((x * x) * (1.0 + ((x * (x * (0.125 + ((x * x) * (x * (x * ((x * x) * 0.004629629629629629))))))) / (0.25 + (t_0 * (t_0 + -0.5))))))) / ((double) M_E);
} else {
tmp = (x * x) * (0.5 * ((x * x) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * 0.16666666666666666);
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 + ((x * x) * (1.0 + ((x * (x * (0.125 + ((x * x) * (x * (x * ((x * x) * 0.004629629629629629))))))) / (0.25 + (t_0 * (t_0 + -0.5))))))) / Math.E;
} else {
tmp = (x * x) * (0.5 * ((x * x) / Math.E));
}
return tmp;
}
def code(x): t_0 = x * (x * 0.16666666666666666) tmp = 0 if (x * x) <= 5e+153: tmp = (1.0 + ((x * x) * (1.0 + ((x * (x * (0.125 + ((x * x) * (x * (x * ((x * x) * 0.004629629629629629))))))) / (0.25 + (t_0 * (t_0 + -0.5))))))) / math.e else: tmp = (x * x) * (0.5 * ((x * x) / math.e)) return tmp
function code(x) t_0 = Float64(x * Float64(x * 0.16666666666666666)) tmp = 0.0 if (Float64(x * x) <= 5e+153) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(x * Float64(x * Float64(0.125 + Float64(Float64(x * x) * Float64(x * Float64(x * Float64(Float64(x * x) * 0.004629629629629629))))))) / Float64(0.25 + Float64(t_0 * Float64(t_0 + -0.5))))))) / exp(1)); else tmp = Float64(Float64(x * x) * Float64(0.5 * Float64(Float64(x * x) / exp(1)))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x * 0.16666666666666666); tmp = 0.0; if ((x * x) <= 5e+153) tmp = (1.0 + ((x * x) * (1.0 + ((x * (x * (0.125 + ((x * x) * (x * (x * ((x * x) * 0.004629629629629629))))))) / (0.25 + (t_0 * (t_0 + -0.5))))))) / 2.71828182845904523536; else tmp = (x * x) * (0.5 * ((x * x) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+153], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(x * N[(x * N[(0.125 + N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(t$95$0 * N[(t$95$0 + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.5 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot 0.16666666666666666\right)\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(1 + \frac{x \cdot \left(x \cdot \left(0.125 + \left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.004629629629629629\right)\right)\right)\right)\right)}{0.25 + t\_0 \cdot \left(t\_0 + -0.5\right)}\right)}{e}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(0.5 \cdot \frac{x \cdot x}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000018e153Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified85.6%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr85.6%
Applied egg-rr89.0%
if 5.00000000000000018e153 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in x around inf
exp-1-eN/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
exp-1-eN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
exp-1-eN/A
associate-*l/N/A
*-lft-identityN/A
exp-1-eN/A
Simplified100.0%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (/ (* x x) 2.0)))
(if (<= (* x x) 5e+153)
(*
(/ 1.0 E)
(+
1.0
(/
(* (* x x) (+ 1.0 (/ (* t_0 t_0) 8.0)))
(+ 1.0 (* t_1 (+ -1.0 t_1))))))
(* (* x x) (* 0.5 (/ (* x x) E))))))
double code(double x) {
double t_0 = x * (x * x);
double t_1 = (x * x) / 2.0;
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (((x * x) * (1.0 + ((t_0 * t_0) / 8.0))) / (1.0 + (t_1 * (-1.0 + t_1)))));
} else {
tmp = (x * x) * (0.5 * ((x * x) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * x);
double t_1 = (x * x) / 2.0;
double tmp;
if ((x * x) <= 5e+153) {
tmp = (1.0 / Math.E) * (1.0 + (((x * x) * (1.0 + ((t_0 * t_0) / 8.0))) / (1.0 + (t_1 * (-1.0 + t_1)))));
} else {
tmp = (x * x) * (0.5 * ((x * x) / Math.E));
}
return tmp;
}
def code(x): t_0 = x * (x * x) t_1 = (x * x) / 2.0 tmp = 0 if (x * x) <= 5e+153: tmp = (1.0 / math.e) * (1.0 + (((x * x) * (1.0 + ((t_0 * t_0) / 8.0))) / (1.0 + (t_1 * (-1.0 + t_1))))) else: tmp = (x * x) * (0.5 * ((x * x) / math.e)) return tmp
function code(x) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(x * x) / 2.0) tmp = 0.0 if (Float64(x * x) <= 5e+153) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(t_0 * t_0) / 8.0))) / Float64(1.0 + Float64(t_1 * Float64(-1.0 + t_1)))))); else tmp = Float64(Float64(x * x) * Float64(0.5 * Float64(Float64(x * x) / exp(1)))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x * x); t_1 = (x * x) / 2.0; tmp = 0.0; if ((x * x) <= 5e+153) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (((x * x) * (1.0 + ((t_0 * t_0) / 8.0))) / (1.0 + (t_1 * (-1.0 + t_1))))); else tmp = (x * x) * (0.5 * ((x * x) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] / 2.0), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+153], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(t$95$0 * t$95$0), $MachinePrecision] / 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 * N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.5 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := \frac{x \cdot x}{2}\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(1 + \frac{t\_0 \cdot t\_0}{8}\right)}{1 + t\_1 \cdot \left(-1 + t\_1\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(0.5 \cdot \frac{x \cdot x}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000018e153Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified78.7%
associate-*r*N/A
flip3-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr88.7%
if 5.00000000000000018e153 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in x around inf
exp-1-eN/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
exp-1-eN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
exp-1-eN/A
associate-*l/N/A
*-lft-identityN/A
exp-1-eN/A
Simplified100.0%
Final simplification93.1%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (+ (/ 1.0 E) (* (/ (* x x) E) (+ 1.0 (/ (* x x) 2.0)))) (* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) + (((x * x) / ((double) M_E)) * (1.0 + ((x * x) / 2.0)));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) + (((x * x) / Math.E) * (1.0 + ((x * x) / 2.0)));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) + (((x * x) / math.e) * (1.0 + ((x * x) / 2.0))) else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) + Float64(Float64(Float64(x * x) / exp(1)) * Float64(1.0 + Float64(Float64(x * x) / 2.0)))); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) + (((x * x) / 2.71828182845904523536) * (1.0 + ((x * x) / 2.0))); else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] + N[(N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} + \frac{x \cdot x}{e} \cdot \left(1 + \frac{x \cdot x}{2}\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.6%
distribute-lft-inN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
E-lowering-E.f64N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
metadata-evalN/A
div-invN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified83.3%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified83.9%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (* (/ 1.0 E) (+ 1.0 (* x (* x (+ 1.0 (* (* x x) 0.5)))))) (* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + ((x * x) * 0.5)))));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + ((x * x) * 0.5)))));
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + ((x * x) * 0.5))))) else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(Float64(x * x) * 0.5)))))); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + ((x * x) * 0.5))))); else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.6%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified83.3%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified83.9%
(FPCore (x) :precision binary64 (* (/ 1.0 E) (+ 1.0 (* x (* x (+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.16666666666666666))))))))))
double code(double x) {
return (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666))))))));
}
public static double code(double x) {
return (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666))))))));
}
def code(x): return (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666))))))))
function code(x) return Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.16666666666666666))))))))) end
function tmp = code(x) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666)))))))); end
code[x_] := N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666\right)\right)\right)\right)\right)
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified91.2%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (/ (+ 1.0 (* x (* x (+ 1.0 (/ (* x x) 2.0))))) E) (* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 + (x * (x * (1.0 + ((x * x) / 2.0))))) / ((double) M_E);
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 + (x * (x * (1.0 + ((x * x) / 2.0))))) / Math.E;
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 + (x * (x * (1.0 + ((x * x) / 2.0))))) / math.e else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(Float64(x * x) / 2.0))))) / exp(1)); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 + (x * (x * (1.0 + ((x * x) / 2.0))))) / 2.71828182845904523536; else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 + N[(x * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1 + x \cdot \left(x \cdot \left(1 + \frac{x \cdot x}{2}\right)\right)}{e}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.6%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
metadata-evalN/A
div-invN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f6499.6%
Applied egg-rr99.6%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified83.3%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified83.9%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (* (/ 1.0 E) (+ (* x x) 1.0)) (* 0.16666666666666666 (/ (* (* x x) (* (* x x) (* x x))) E))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) * ((x * x) + 1.0);
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) * ((x * x) + 1.0);
} else {
tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) * ((x * x) + 1.0) else: tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) * Float64(Float64(x * x) + 1.0)); else tmp = Float64(0.16666666666666666 * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(x * x))) / exp(1))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) * ((x * x) + 1.0); else tmp = 0.16666666666666666 * (((x * x) * ((x * x) * (x * x))) / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} \cdot \left(x \cdot x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \frac{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.2%
Simplified99.2%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified83.3%
Taylor expanded in x around inf
*-rgt-identityN/A
exp-1-eN/A
associate-*r/N/A
exp-1-eN/A
*-lowering-*.f64N/A
exp-1-eN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
Simplified83.9%
(FPCore (x) :precision binary64 (/ (+ 1.0 (* x (* x (+ 1.0 (* x (* x (+ (* x (* x 0.16666666666666666)) 0.5))))))) E))
double code(double x) {
return (1.0 + (x * (x * (1.0 + (x * (x * ((x * (x * 0.16666666666666666)) + 0.5))))))) / ((double) M_E);
}
public static double code(double x) {
return (1.0 + (x * (x * (1.0 + (x * (x * ((x * (x * 0.16666666666666666)) + 0.5))))))) / Math.E;
}
def code(x): return (1.0 + (x * (x * (1.0 + (x * (x * ((x * (x * 0.16666666666666666)) + 0.5))))))) / math.e
function code(x) return Float64(Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(Float64(x * Float64(x * 0.16666666666666666)) + 0.5))))))) / exp(1)) end
function tmp = code(x) tmp = (1.0 + (x * (x * (1.0 + (x * (x * ((x * (x * 0.16666666666666666)) + 0.5))))))) / 2.71828182845904523536; end
code[x_] := N[(N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(x * N[(N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 + x \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 0.16666666666666666\right) + 0.5\right)\right)\right)\right)}{e}
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified91.2%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr91.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.2%
Simplified91.2%
Final simplification91.2%
(FPCore (x) :precision binary64 (* (/ 1.0 E) (+ 1.0 (* x (* x (+ 1.0 (* x (* (* x x) (* x 0.16666666666666666)))))))))
double code(double x) {
return (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * ((x * x) * (x * 0.16666666666666666)))))));
}
public static double code(double x) {
return (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * ((x * x) * (x * 0.16666666666666666)))))));
}
def code(x): return (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * ((x * x) * (x * 0.16666666666666666)))))))
function code(x) return Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(Float64(x * x) * Float64(x * 0.16666666666666666)))))))) end
function tmp = code(x) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * ((x * x) * (x * 0.16666666666666666))))))); end
code[x_] := N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot 0.16666666666666666\right)\right)\right)\right)\right)
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified91.2%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6490.9%
Simplified90.9%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (* (/ 1.0 E) (+ (* x x) 1.0)) (* (/ (* x x) E) (+ 1.0 (* (* x x) 0.5)))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) * ((x * x) + 1.0);
} else {
tmp = ((x * x) / ((double) M_E)) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) * ((x * x) + 1.0);
} else {
tmp = ((x * x) / Math.E) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) * ((x * x) + 1.0) else: tmp = ((x * x) / math.e) * (1.0 + ((x * x) * 0.5)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) * Float64(Float64(x * x) + 1.0)); else tmp = Float64(Float64(Float64(x * x) / exp(1)) * Float64(1.0 + Float64(Float64(x * x) * 0.5))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) * ((x * x) + 1.0); else tmp = ((x * x) / 2.71828182845904523536) * (1.0 + ((x * x) * 0.5)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} \cdot \left(x \cdot x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot x}{e} \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.2%
Simplified99.2%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified75.5%
Taylor expanded in x around inf
Simplified75.5%
Final simplification86.8%
(FPCore (x) :precision binary64 (/ (+ 1.0 (* (* x x) (+ 1.0 (* (* x (* x (* x x))) 0.16666666666666666)))) E))
double code(double x) {
return (1.0 + ((x * x) * (1.0 + ((x * (x * (x * x))) * 0.16666666666666666)))) / ((double) M_E);
}
public static double code(double x) {
return (1.0 + ((x * x) * (1.0 + ((x * (x * (x * x))) * 0.16666666666666666)))) / Math.E;
}
def code(x): return (1.0 + ((x * x) * (1.0 + ((x * (x * (x * x))) * 0.16666666666666666)))) / math.e
function code(x) return Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(x * Float64(x * Float64(x * x))) * 0.16666666666666666)))) / exp(1)) end
function tmp = code(x) tmp = (1.0 + ((x * x) * (1.0 + ((x * (x * (x * x))) * 0.16666666666666666)))) / 2.71828182845904523536; end
code[x_] := N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 + \left(x \cdot x\right) \cdot \left(1 + \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot 0.16666666666666666\right)}{e}
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
Simplified91.2%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr91.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.9%
Simplified90.9%
Final simplification90.9%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (* (/ 1.0 E) (+ (* x x) 1.0)) (* (* x x) (* 0.5 (/ (* x x) E)))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / ((double) M_E)) * ((x * x) + 1.0);
} else {
tmp = (x * x) * (0.5 * ((x * x) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = (1.0 / Math.E) * ((x * x) + 1.0);
} else {
tmp = (x * x) * (0.5 * ((x * x) / Math.E));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = (1.0 / math.e) * ((x * x) + 1.0) else: tmp = (x * x) * (0.5 * ((x * x) / math.e)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(Float64(1.0 / exp(1)) * Float64(Float64(x * x) + 1.0)); else tmp = Float64(Float64(x * x) * Float64(0.5 * Float64(Float64(x * x) / exp(1)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = (1.0 / 2.71828182845904523536) * ((x * x) + 1.0); else tmp = (x * x) * (0.5 * ((x * x) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(N[(1.0 / E), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.5 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e} \cdot \left(x \cdot x + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(0.5 \cdot \frac{x \cdot x}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.2%
Simplified99.2%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified75.5%
Taylor expanded in x around inf
exp-1-eN/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
exp-1-eN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
exp-1-eN/A
associate-*l/N/A
*-lft-identityN/A
exp-1-eN/A
Simplified75.5%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (/ 1.0 E) (/ 1.0 (/ E (* x x)))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = 1.0 / ((double) M_E);
} else {
tmp = 1.0 / (((double) M_E) / (x * x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = 1.0 / Math.E;
} else {
tmp = 1.0 / (Math.E / (x * x));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = 1.0 / math.e else: tmp = 1.0 / (math.e / (x * x)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(1.0 / exp(1)); else tmp = Float64(1.0 / Float64(exp(1) / Float64(x * x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = 1.0 / 2.71828182845904523536; else tmp = 1.0 / (2.71828182845904523536 / (x * x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(1.0 / E), $MachinePrecision], N[(1.0 / N[(E / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{e}{x \cdot x}}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6498.6%
Simplified98.6%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
Taylor expanded in x around inf
exp-1-eN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f6457.0%
Simplified57.0%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
E-lowering-E.f64N/A
*-lowering-*.f6457.0%
Applied egg-rr57.0%
(FPCore (x) :precision binary64 (if (<= (* x x) 0.001) (/ 1.0 E) (* x (/ x E))))
double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = 1.0 / ((double) M_E);
} else {
tmp = x * (x / ((double) M_E));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 0.001) {
tmp = 1.0 / Math.E;
} else {
tmp = x * (x / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 0.001: tmp = 1.0 / math.e else: tmp = x * (x / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 0.001) tmp = Float64(1.0 / exp(1)); else tmp = Float64(x * Float64(x / exp(1))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 0.001) tmp = 1.0 / 2.71828182845904523536; else tmp = x * (x / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 0.001], N[(1.0 / E), $MachinePrecision], N[(x * N[(x / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 0.001:\\
\;\;\;\;\frac{1}{e}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{x}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 1e-3Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6498.6%
Simplified98.6%
if 1e-3 < (*.f64 x x) Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
Taylor expanded in x around inf
exp-1-eN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f6457.0%
Simplified57.0%
associate-/l*N/A
*-lft-identityN/A
associate-*l/N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
E-lowering-E.f6457.0%
Applied egg-rr57.0%
Final simplification76.8%
(FPCore (x) :precision binary64 (* (/ 1.0 E) (+ (* x x) 1.0)))
double code(double x) {
return (1.0 / ((double) M_E)) * ((x * x) + 1.0);
}
public static double code(double x) {
return (1.0 / Math.E) * ((x * x) + 1.0);
}
def code(x): return (1.0 / math.e) * ((x * x) + 1.0)
function code(x) return Float64(Float64(1.0 / exp(1)) * Float64(Float64(x * x) + 1.0)) end
function tmp = code(x) tmp = (1.0 / 2.71828182845904523536) * ((x * x) + 1.0); end
code[x_] := N[(N[(1.0 / E), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e} \cdot \left(x \cdot x + 1\right)
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6477.1%
Simplified77.1%
(FPCore (x) :precision binary64 (/ (+ (* x x) 1.0) E))
double code(double x) {
return ((x * x) + 1.0) / ((double) M_E);
}
public static double code(double x) {
return ((x * x) + 1.0) / Math.E;
}
def code(x): return ((x * x) + 1.0) / math.e
function code(x) return Float64(Float64(Float64(x * x) + 1.0) / exp(1)) end
function tmp = code(x) tmp = ((x * x) + 1.0) / 2.71828182845904523536; end
code[x_] := N[(N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot x + 1}{e}
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6477.1%
Simplified77.1%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f6477.1%
Applied egg-rr77.1%
Final simplification77.1%
(FPCore (x) :precision binary64 (/ 1.0 E))
double code(double x) {
return 1.0 / ((double) M_E);
}
public static double code(double x) {
return 1.0 / Math.E;
}
def code(x): return 1.0 / math.e
function code(x) return Float64(1.0 / exp(1)) end
function tmp = code(x) tmp = 1.0 / 2.71828182845904523536; end
code[x_] := N[(1.0 / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e}
\end{array}
Initial program 100.0%
exp-lowering-exp.f64N/A
neg-sub0N/A
associate--r-N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6448.6%
Simplified48.6%
herbie shell --seed 2024191
(FPCore (x)
:name "exp neg sub"
:precision binary64
(exp (- (- 1.0 (* x x)))))