
(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 27 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 (/ (pow (exp (* x 4.0)) (/ x 4.0)) E))
double code(double x) {
return pow(exp((x * 4.0)), (x / 4.0)) / ((double) M_E);
}
public static double code(double x) {
return Math.pow(Math.exp((x * 4.0)), (x / 4.0)) / Math.E;
}
def code(x): return math.pow(math.exp((x * 4.0)), (x / 4.0)) / math.e
function code(x) return Float64((exp(Float64(x * 4.0)) ^ Float64(x / 4.0)) / exp(1)) end
function tmp = code(x) tmp = (exp((x * 4.0)) ^ (x / 4.0)) / 2.71828182845904523536; end
code[x_] := N[(N[Power[N[Exp[N[(x * 4.0), $MachinePrecision]], $MachinePrecision], N[(x / 4.0), $MachinePrecision]], $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\left(e^{x \cdot 4}\right)}^{\left(\frac{x}{4}\right)}}{e}
\end{array}
Initial program 100.0%
exp-negN/A
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f64100.0%
Applied egg-rr100.0%
exp-prodN/A
sqr-powN/A
pow-prod-downN/A
div-invN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
exp-lowering-exp.f64N/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
rem-exp-logN/A
prod-expN/A
exp-lowering-exp.f64N/A
+-lowering-+.f64N/A
exp-lft-sqrN/A
rem-log-expN/A
*-lowering-*.f64N/A
exp-lft-sqrN/A
rem-log-expN/A
*-lowering-*.f64N/A
associate-/l/N/A
metadata-evalN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
distribute-lft-outN/A
metadata-evalN/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
(FPCore (x) :precision binary64 (/ (pow (exp (* x 2.0)) (/ x 2.0)) E))
double code(double x) {
return pow(exp((x * 2.0)), (x / 2.0)) / ((double) M_E);
}
public static double code(double x) {
return Math.pow(Math.exp((x * 2.0)), (x / 2.0)) / Math.E;
}
def code(x): return math.pow(math.exp((x * 2.0)), (x / 2.0)) / math.e
function code(x) return Float64((exp(Float64(x * 2.0)) ^ Float64(x / 2.0)) / exp(1)) end
function tmp = code(x) tmp = (exp((x * 2.0)) ^ (x / 2.0)) / 2.71828182845904523536; end
code[x_] := N[(N[Power[N[Exp[N[(x * 2.0), $MachinePrecision]], $MachinePrecision], N[(x / 2.0), $MachinePrecision]], $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\left(e^{x \cdot 2}\right)}^{\left(\frac{x}{2}\right)}}{e}
\end{array}
Initial program 100.0%
exp-negN/A
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f64100.0%
Applied egg-rr100.0%
exp-prodN/A
sqr-powN/A
pow-prod-downN/A
div-invN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
exp-lowering-exp.f64N/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
rem-exp-logN/A
exp-lowering-exp.f64N/A
exp-lft-sqrN/A
rem-log-expN/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
(FPCore (x) :precision binary64 (/ (pow (exp x) x) E))
double code(double x) {
return pow(exp(x), x) / ((double) M_E);
}
public static double code(double x) {
return Math.pow(Math.exp(x), x) / Math.E;
}
def code(x): return math.pow(math.exp(x), x) / math.e
function code(x) return Float64((exp(x) ^ x) / exp(1)) end
function tmp = code(x) tmp = (exp(x) ^ x) / 2.71828182845904523536; end
code[x_] := N[(N[Power[N[Exp[x], $MachinePrecision], x], $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\left(e^{x}\right)}^{x}}{e}
\end{array}
Initial program 100.0%
exp-negN/A
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f64100.0%
Applied egg-rr100.0%
exp-prodN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64100.0%
Applied egg-rr100.0%
(FPCore (x)
:precision binary64
(if (<= (* x x) 5e-5)
(*
(/ 1.0 E)
(+
1.0
(* (* x x) (+ 1.0 (* (* x x) (+ 0.5 (* (* x x) 0.16666666666666666)))))))
(exp (* x x))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + ((x * x) * (1.0 + ((x * x) * (0.5 + ((x * x) * 0.16666666666666666))))));
} else {
tmp = exp((x * x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + ((x * x) * (1.0 + ((x * x) * (0.5 + ((x * x) * 0.16666666666666666))))));
} else {
tmp = Math.exp((x * x));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + ((x * x) * (1.0 + ((x * x) * (0.5 + ((x * x) * 0.16666666666666666)))))) else: tmp = math.exp((x * x)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * 0.16666666666666666))))))); else tmp = exp(Float64(x * x)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + ((x * x) * (1.0 + ((x * x) * (0.5 + ((x * x) * 0.16666666666666666)))))); else tmp = exp((x * x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{x \cdot x}\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around inf
unpow2N/A
*-lowering-*.f6499.4%
Simplified99.4%
(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%
Final simplification100.0%
(FPCore (x) :precision binary64 (/ (exp (* x x)) E))
double code(double x) {
return exp((x * x)) / ((double) M_E);
}
public static double code(double x) {
return Math.exp((x * x)) / Math.E;
}
def code(x): return math.exp((x * x)) / math.e
function code(x) return Float64(exp(Float64(x * x)) / exp(1)) end
function tmp = code(x) tmp = exp((x * x)) / 2.71828182845904523536; end
code[x_] := N[(N[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{x \cdot x}}{e}
\end{array}
Initial program 100.0%
exp-negN/A
exp-diffN/A
clear-numN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
exp-1-eN/A
E-lowering-E.f64100.0%
Applied egg-rr100.0%
(FPCore (x)
:precision binary64
(let* ((t_0 (* (* x x) (+ 0.5 (* x (* x 0.16666666666666666)))))
(t_1 (* x (* x (- -1.0 t_0))))
(t_2 (* x (* x (+ 1.0 t_0)))))
(if (<= (* x x) 5e+46)
(/ (/ (+ 1.0 (* t_2 (* t_2 t_2))) E) (+ 1.0 (* t_2 (+ t_2 -1.0))))
(if (<= (* x x) 5e+101)
(/ (/ (+ 1.0 (* t_2 t_1)) E) (+ 1.0 t_1))
(* (* x x) (* (* x x) (* 0.16666666666666666 (/ (* x x) E))))))))
double code(double x) {
double t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666)));
double t_1 = x * (x * (-1.0 - t_0));
double t_2 = x * (x * (1.0 + t_0));
double tmp;
if ((x * x) <= 5e+46) {
tmp = ((1.0 + (t_2 * (t_2 * t_2))) / ((double) M_E)) / (1.0 + (t_2 * (t_2 + -1.0)));
} else if ((x * x) <= 5e+101) {
tmp = ((1.0 + (t_2 * t_1)) / ((double) M_E)) / (1.0 + t_1);
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666)));
double t_1 = x * (x * (-1.0 - t_0));
double t_2 = x * (x * (1.0 + t_0));
double tmp;
if ((x * x) <= 5e+46) {
tmp = ((1.0 + (t_2 * (t_2 * t_2))) / Math.E) / (1.0 + (t_2 * (t_2 + -1.0)));
} else if ((x * x) <= 5e+101) {
tmp = ((1.0 + (t_2 * t_1)) / Math.E) / (1.0 + t_1);
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666))) t_1 = x * (x * (-1.0 - t_0)) t_2 = x * (x * (1.0 + t_0)) tmp = 0 if (x * x) <= 5e+46: tmp = ((1.0 + (t_2 * (t_2 * t_2))) / math.e) / (1.0 + (t_2 * (t_2 + -1.0))) elif (x * x) <= 5e+101: tmp = ((1.0 + (t_2 * t_1)) / math.e) / (1.0 + t_1) else: tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.16666666666666666)))) t_1 = Float64(x * Float64(x * Float64(-1.0 - t_0))) t_2 = Float64(x * Float64(x * Float64(1.0 + t_0))) tmp = 0.0 if (Float64(x * x) <= 5e+46) tmp = Float64(Float64(Float64(1.0 + Float64(t_2 * Float64(t_2 * t_2))) / exp(1)) / Float64(1.0 + Float64(t_2 * Float64(t_2 + -1.0)))); elseif (Float64(x * x) <= 5e+101) tmp = Float64(Float64(Float64(1.0 + Float64(t_2 * t_1)) / exp(1)) / Float64(1.0 + t_1)); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.16666666666666666 * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666))); t_1 = x * (x * (-1.0 - t_0)); t_2 = x * (x * (1.0 + t_0)); tmp = 0.0; if ((x * x) <= 5e+46) tmp = ((1.0 + (t_2 * (t_2 * t_2))) / 2.71828182845904523536) / (1.0 + (t_2 * (t_2 + -1.0))); elseif ((x * x) <= 5e+101) tmp = ((1.0 + (t_2 * t_1)) / 2.71828182845904523536) / (1.0 + t_1); else tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(x * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+46], N[(N[(N[(1.0 + N[(t$95$2 * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision] / N[(1.0 + N[(t$95$2 * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * x), $MachinePrecision], 5e+101], N[(N[(N[(1.0 + N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.16666666666666666 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.16666666666666666\right)\right)\\
t_1 := x \cdot \left(x \cdot \left(-1 - t\_0\right)\right)\\
t_2 := x \cdot \left(x \cdot \left(1 + t\_0\right)\right)\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+46}:\\
\;\;\;\;\frac{\frac{1 + t\_2 \cdot \left(t\_2 \cdot t\_2\right)}{e}}{1 + t\_2 \cdot \left(t\_2 + -1\right)}\\
\mathbf{elif}\;x \cdot x \leq 5 \cdot 10^{+101}:\\
\;\;\;\;\frac{\frac{1 + t\_2 \cdot t\_1}{e}}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.16666666666666666 \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.0000000000000002e46Initial program 99.9%
Taylor expanded in x around 0
Simplified90.4%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr93.8%
if 5.0000000000000002e46 < (*.f64 x x) < 4.99999999999999989e101Initial program 100.0%
Taylor expanded in x around 0
Simplified7.3%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
if 4.99999999999999989e101 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
+-commutativeN/A
distribute-rgt-inN/A
un-div-invN/A
div-invN/A
frac-addN/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
pow-plusN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Final simplification96.6%
(FPCore (x)
:precision binary64
(let* ((t_0 (* (* x x) (+ 0.5 (* x (* x 0.16666666666666666)))))
(t_1 (* x (* x (- -1.0 t_0)))))
(if (<= (* x x) 5e+101)
(/ (/ (+ 1.0 (* (* x (* x (+ 1.0 t_0))) t_1)) E) (+ 1.0 t_1))
(* (* x x) (* (* x x) (* 0.16666666666666666 (/ (* x x) E)))))))
double code(double x) {
double t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666)));
double t_1 = x * (x * (-1.0 - t_0));
double tmp;
if ((x * x) <= 5e+101) {
tmp = ((1.0 + ((x * (x * (1.0 + t_0))) * t_1)) / ((double) M_E)) / (1.0 + t_1);
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666)));
double t_1 = x * (x * (-1.0 - t_0));
double tmp;
if ((x * x) <= 5e+101) {
tmp = ((1.0 + ((x * (x * (1.0 + t_0))) * t_1)) / Math.E) / (1.0 + t_1);
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666))) t_1 = x * (x * (-1.0 - t_0)) tmp = 0 if (x * x) <= 5e+101: tmp = ((1.0 + ((x * (x * (1.0 + t_0))) * t_1)) / math.e) / (1.0 + t_1) else: tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.16666666666666666)))) t_1 = Float64(x * Float64(x * Float64(-1.0 - t_0))) tmp = 0.0 if (Float64(x * x) <= 5e+101) tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * Float64(x * Float64(1.0 + t_0))) * t_1)) / exp(1)) / Float64(1.0 + t_1)); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.16666666666666666 * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = (x * x) * (0.5 + (x * (x * 0.16666666666666666))); t_1 = x * (x * (-1.0 - t_0)); tmp = 0.0; if ((x * x) <= 5e+101) tmp = ((1.0 + ((x * (x * (1.0 + t_0))) * t_1)) / 2.71828182845904523536) / (1.0 + t_1); else tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 5e+101], N[(N[(N[(1.0 + N[(N[(x * N[(x * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.16666666666666666 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.16666666666666666\right)\right)\\
t_1 := x \cdot \left(x \cdot \left(-1 - t\_0\right)\right)\\
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+101}:\\
\;\;\;\;\frac{\frac{1 + \left(x \cdot \left(x \cdot \left(1 + t\_0\right)\right)\right) \cdot t\_1}{e}}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.16666666666666666 \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 4.99999999999999989e101Initial program 100.0%
Taylor expanded in x around 0
Simplified84.9%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr91.1%
if 4.99999999999999989e101 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
+-commutativeN/A
distribute-rgt-inN/A
un-div-invN/A
div-invN/A
frac-addN/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
pow-plusN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Final simplification94.7%
(FPCore (x)
:precision binary64
(let* ((t_0 (+ 0.5 (* x (* x 0.16666666666666666)))) (t_1 (* (* x x) t_0)))
(if (<= (* x x) 1e+153)
(*
(/ 1.0 E)
(+ 1.0 (/ (* (* x x) (- 1.0 (* t_0 (* (* x x) t_1)))) (- 1.0 t_1))))
(* x (* 0.5 (* x (/ (* x x) E)))))))
double code(double x) {
double t_0 = 0.5 + (x * (x * 0.16666666666666666));
double t_1 = (x * x) * t_0;
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * x) * t_1)))) / (1.0 - t_1)));
} else {
tmp = x * (0.5 * (x * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = 0.5 + (x * (x * 0.16666666666666666));
double t_1 = (x * x) * t_0;
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 / Math.E) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * x) * t_1)))) / (1.0 - t_1)));
} else {
tmp = x * (0.5 * (x * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = 0.5 + (x * (x * 0.16666666666666666)) t_1 = (x * x) * t_0 tmp = 0 if (x * x) <= 1e+153: tmp = (1.0 / math.e) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * x) * t_1)))) / (1.0 - t_1))) else: tmp = x * (0.5 * (x * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(0.5 + Float64(x * Float64(x * 0.16666666666666666))) t_1 = Float64(Float64(x * x) * t_0) tmp = 0.0 if (Float64(x * x) <= 1e+153) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 - Float64(t_0 * Float64(Float64(x * x) * t_1)))) / Float64(1.0 - t_1)))); else tmp = Float64(x * Float64(0.5 * Float64(x * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = 0.5 + (x * (x * 0.16666666666666666)); t_1 = (x * x) * t_0; tmp = 0.0; if ((x * x) <= 1e+153) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * x) * t_1)))) / (1.0 - t_1))); else tmp = x * (0.5 * (x * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(0.5 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 1e+153], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 - N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + x \cdot \left(x \cdot 0.16666666666666666\right)\\
t_1 := \left(x \cdot x\right) \cdot t\_0\\
\mathbf{if}\;x \cdot x \leq 10^{+153}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(1 - t\_0 \cdot \left(\left(x \cdot x\right) \cdot t\_1\right)\right)}{1 - t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e153Initial program 100.0%
Taylor expanded in x around 0
Simplified85.8%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.8%
if 1e153 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/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
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified100.0%
Final simplification93.6%
(FPCore (x)
:precision binary64
(let* ((t_0 (+ 0.5 (* x (* x 0.16666666666666666)))))
(if (<= (* x x) 1e+153)
(*
(/ 1.0 E)
(+
1.0
(/
(*
(* x x)
(-
1.0
(* t_0 (* (* x (* (* x x) 0.16666666666666666)) (* x (* x x))))))
(- 1.0 (* (* x x) t_0)))))
(* x (* 0.5 (* x (/ (* x x) E)))))))
double code(double x) {
double t_0 = 0.5 + (x * (x * 0.16666666666666666));
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * ((x * x) * 0.16666666666666666)) * (x * (x * x)))))) / (1.0 - ((x * x) * t_0))));
} else {
tmp = x * (0.5 * (x * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = 0.5 + (x * (x * 0.16666666666666666));
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 / Math.E) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * ((x * x) * 0.16666666666666666)) * (x * (x * x)))))) / (1.0 - ((x * x) * t_0))));
} else {
tmp = x * (0.5 * (x * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = 0.5 + (x * (x * 0.16666666666666666)) tmp = 0 if (x * x) <= 1e+153: tmp = (1.0 / math.e) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * ((x * x) * 0.16666666666666666)) * (x * (x * x)))))) / (1.0 - ((x * x) * t_0)))) else: tmp = x * (0.5 * (x * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(0.5 + Float64(x * Float64(x * 0.16666666666666666))) tmp = 0.0 if (Float64(x * x) <= 1e+153) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 - Float64(t_0 * Float64(Float64(x * Float64(Float64(x * x) * 0.16666666666666666)) * Float64(x * Float64(x * x)))))) / Float64(1.0 - Float64(Float64(x * x) * t_0))))); else tmp = Float64(x * Float64(0.5 * Float64(x * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = 0.5 + (x * (x * 0.16666666666666666)); tmp = 0.0; if ((x * x) <= 1e+153) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (((x * x) * (1.0 - (t_0 * ((x * ((x * x) * 0.16666666666666666)) * (x * (x * x)))))) / (1.0 - ((x * x) * t_0)))); else tmp = x * (0.5 * (x * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(0.5 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 1e+153], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 - N[(t$95$0 * N[(N[(x * N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + x \cdot \left(x \cdot 0.16666666666666666\right)\\
\mathbf{if}\;x \cdot x \leq 10^{+153}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(1 - t\_0 \cdot \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot 0.16666666666666666\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}{1 - \left(x \cdot x\right) \cdot t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e153Initial program 100.0%
Taylor expanded in x around 0
Simplified85.8%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.8%
Taylor expanded in x around inf
metadata-evalN/A
metadata-evalN/A
pow-plusN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.7%
Simplified89.7%
if 1e153 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/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
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified100.0%
Final simplification93.6%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (* x (* x 0.16666666666666666))))
(if (<= (* x x) 1e+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 (* 0.5 (* x (/ (* 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) <= 1e+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 * (0.5 * (x * ((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) <= 1e+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 * (0.5 * (x * ((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) <= 1e+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 * (0.5 * (x * ((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) <= 1e+153) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(0.125 + Float64(t_0 * Float64(t_0 * 0.004629629629629629)))) / Float64(0.25 + Float64(t_1 * Float64(t_1 + -0.5)))))))); else tmp = Float64(x * Float64(0.5 * Float64(x * 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) <= 1e+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 * (0.5 * (x * ((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], 1e+153], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(0.125 + N[(t$95$0 * N[(t$95$0 * 0.004629629629629629), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.25 + N[(t$95$1 * N[(t$95$1 + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $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 10^{+153}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(0.125 + t\_0 \cdot \left(t\_0 \cdot 0.004629629629629629\right)\right)}{0.25 + t\_1 \cdot \left(t\_1 + -0.5\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e153Initial program 100.0%
Taylor expanded in x around 0
Simplified85.8%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr88.6%
if 1e153 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/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
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified100.0%
Final simplification92.9%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (/ x 2.0))) (t_1 (* (* x x) (- -1.0 t_0))))
(if (<= (* x x) 1e+153)
(/ (/ (+ 1.0 (* (* (* x x) (+ 1.0 t_0)) t_1)) E) (+ 1.0 t_1))
(* x (* 0.5 (* x (/ (* x x) E)))))))
double code(double x) {
double t_0 = x * (x / 2.0);
double t_1 = (x * x) * (-1.0 - t_0);
double tmp;
if ((x * x) <= 1e+153) {
tmp = ((1.0 + (((x * x) * (1.0 + t_0)) * t_1)) / ((double) M_E)) / (1.0 + t_1);
} else {
tmp = x * (0.5 * (x * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x / 2.0);
double t_1 = (x * x) * (-1.0 - t_0);
double tmp;
if ((x * x) <= 1e+153) {
tmp = ((1.0 + (((x * x) * (1.0 + t_0)) * t_1)) / Math.E) / (1.0 + t_1);
} else {
tmp = x * (0.5 * (x * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = x * (x / 2.0) t_1 = (x * x) * (-1.0 - t_0) tmp = 0 if (x * x) <= 1e+153: tmp = ((1.0 + (((x * x) * (1.0 + t_0)) * t_1)) / math.e) / (1.0 + t_1) else: tmp = x * (0.5 * (x * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(x * Float64(x / 2.0)) t_1 = Float64(Float64(x * x) * Float64(-1.0 - t_0)) tmp = 0.0 if (Float64(x * x) <= 1e+153) tmp = Float64(Float64(Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 + t_0)) * t_1)) / exp(1)) / Float64(1.0 + t_1)); else tmp = Float64(x * Float64(0.5 * Float64(x * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x / 2.0); t_1 = (x * x) * (-1.0 - t_0); tmp = 0.0; if ((x * x) <= 1e+153) tmp = ((1.0 + (((x * x) * (1.0 + t_0)) * t_1)) / 2.71828182845904523536) / (1.0 + t_1); else tmp = x * (0.5 * (x * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x / 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 1e+153], N[(N[(N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{x}{2}\\
t_1 := \left(x \cdot x\right) \cdot \left(-1 - t\_0\right)\\
\mathbf{if}\;x \cdot x \leq 10^{+153}:\\
\;\;\;\;\frac{\frac{1 + \left(\left(x \cdot x\right) \cdot \left(1 + t\_0\right)\right) \cdot t\_1}{e}}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e153Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified80.3%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr88.5%
if 1e153 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/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
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified100.0%
Final simplification92.8%
(FPCore (x)
:precision binary64
(let* ((t_0 (/ x (/ 2.0 x))))
(if (<= (* x x) 1e+153)
(/
(+
1.0
(/
(* (* x x) (+ 1.0 (/ (* (* x x) (* x (* x (* x x)))) 8.0)))
(+ 1.0 (* t_0 (+ -1.0 t_0)))))
E)
(* x (* 0.5 (* x (/ (* x x) E)))))))
double code(double x) {
double t_0 = x / (2.0 / x);
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 + (((x * x) * (1.0 + (((x * x) * (x * (x * (x * x)))) / 8.0))) / (1.0 + (t_0 * (-1.0 + t_0))))) / ((double) M_E);
} else {
tmp = x * (0.5 * (x * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double t_0 = x / (2.0 / x);
double tmp;
if ((x * x) <= 1e+153) {
tmp = (1.0 + (((x * x) * (1.0 + (((x * x) * (x * (x * (x * x)))) / 8.0))) / (1.0 + (t_0 * (-1.0 + t_0))))) / Math.E;
} else {
tmp = x * (0.5 * (x * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): t_0 = x / (2.0 / x) tmp = 0 if (x * x) <= 1e+153: tmp = (1.0 + (((x * x) * (1.0 + (((x * x) * (x * (x * (x * x)))) / 8.0))) / (1.0 + (t_0 * (-1.0 + t_0))))) / math.e else: tmp = x * (0.5 * (x * ((x * x) / math.e))) return tmp
function code(x) t_0 = Float64(x / Float64(2.0 / x)) tmp = 0.0 if (Float64(x * x) <= 1e+153) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(x * Float64(x * Float64(x * x)))) / 8.0))) / Float64(1.0 + Float64(t_0 * Float64(-1.0 + t_0))))) / exp(1)); else tmp = Float64(x * Float64(0.5 * Float64(x * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) t_0 = x / (2.0 / x); tmp = 0.0; if ((x * x) <= 1e+153) tmp = (1.0 + (((x * x) * (1.0 + (((x * x) * (x * (x * (x * x)))) / 8.0))) / (1.0 + (t_0 * (-1.0 + t_0))))) / 2.71828182845904523536; else tmp = x * (0.5 * (x * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x / N[(2.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * x), $MachinePrecision], 1e+153], N[(N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$0 * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\frac{2}{x}}\\
\mathbf{if}\;x \cdot x \leq 10^{+153}:\\
\;\;\;\;\frac{1 + \frac{\left(x \cdot x\right) \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{8}\right)}{1 + t\_0 \cdot \left(-1 + t\_0\right)}}{e}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1e153Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified80.3%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
E-lowering-E.f6480.3%
Applied egg-rr80.3%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr88.5%
if 1e153 < (*.f64 x x) Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/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
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified100.0%
Final simplification92.8%
(FPCore (x)
:precision binary64
(if (<= (* x x) 5e-5)
(* (/ 1.0 E) (+ 1.0 (* x (* x (+ 1.0 (* x (* x 0.5)))))))
(*
(/ (* x x) E)
(+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.16666666666666666))))))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5))))));
} else {
tmp = ((x * x) / ((double) M_E)) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666)))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5))))));
} else {
tmp = ((x * x) / Math.E) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666)))));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5)))))) else: tmp = ((x * x) / math.e) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666))))) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.5))))))); else tmp = Float64(Float64(Float64(x * x) / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5)))))); else tmp = ((x * x) / 2.71828182845904523536) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot x}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.9%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
Simplified82.4%
+-commutativeN/A
distribute-rgt-inN/A
un-div-invN/A
div-invN/A
frac-addN/A
/-lowering-/.f64N/A
Applied egg-rr82.4%
Taylor expanded in x around inf
Simplified82.4%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (* (/ 1.0 E) (+ 1.0 (* x (* x (+ 1.0 (* x (* x 0.5))))))) (* (* x x) (* (* x x) (/ (+ 0.5 (* (* x x) 0.16666666666666666)) E)))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5))))));
} else {
tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5))))));
} else {
tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / Math.E));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5)))))) else: tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / math.e)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.5))))))); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(Float64(0.5 + Float64(Float64(x * x) * 0.16666666666666666)) / exp(1)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * (x * (1.0 + (x * (x * 0.5)))))); else tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.9%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
Simplified82.4%
Taylor expanded in x around inf
Simplified82.4%
distribute-rgt-inN/A
associate-*r*N/A
distribute-rgt-inN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f6482.4%
Applied egg-rr82.4%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (/ (+ 1.0 (* (* x x) (+ 1.0 (* x (/ x 2.0))))) E) (* (* x x) (* (* x x) (/ (+ 0.5 (* (* x x) 0.16666666666666666)) E)))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / ((double) M_E);
} else {
tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / ((double) M_E)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / Math.E;
} else {
tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / Math.E));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / math.e else: tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / math.e)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(x * Float64(x / 2.0))))) / exp(1)); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(Float64(0.5 + Float64(Float64(x * x) * 0.16666666666666666)) / exp(1)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / 2.71828182845904523536; else tmp = (x * x) * ((x * x) * ((0.5 + ((x * x) * 0.16666666666666666)) / 2.71828182845904523536)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(x * N[(x / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(1 + x \cdot \frac{x}{2}\right)}{e}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666}{e}\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.9%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
E-lowering-E.f6499.9%
Applied egg-rr99.9%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
Simplified82.4%
Taylor expanded in x around inf
Simplified82.4%
distribute-rgt-inN/A
associate-*r*N/A
distribute-rgt-inN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f6482.4%
Applied egg-rr82.4%
(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(Float64(x * x) * Float64(1.0 + Float64(Float64(x * 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[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.16666666666666666\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified91.1%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (/ (+ 1.0 (* (* x x) (+ 1.0 (* x (/ x 2.0))))) E) (* (* x x) (* (* x x) (* 0.16666666666666666 (/ (* x x) E))))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / ((double) M_E);
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / Math.E;
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / math.e else: tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / math.e))) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(1.0 + Float64(x * Float64(x / 2.0))))) / exp(1)); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.16666666666666666 * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 + ((x * x) * (1.0 + (x * (x / 2.0))))) / 2.71828182845904523536; else tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(1.0 + N[(x * N[(x / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.16666666666666666 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(1 + x \cdot \frac{x}{2}\right)}{e}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.16666666666666666 \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.9%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
E-lowering-E.f6499.9%
Applied egg-rr99.9%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
Simplified82.4%
+-commutativeN/A
distribute-rgt-inN/A
un-div-invN/A
div-invN/A
frac-addN/A
/-lowering-/.f64N/A
Applied egg-rr82.4%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
pow-plusN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified82.4%
Final simplification91.1%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (* (/ 1.0 E) (+ 1.0 (* x x))) (* (* x x) (* (* x x) (* 0.16666666666666666 (/ (* x x) E))))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * x));
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + (x * x));
} else {
tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + (x * x)) else: tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / math.e))) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * x))); else tmp = Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.16666666666666666 * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * x)); else tmp = (x * x) * ((x * x) * (0.16666666666666666 * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.16666666666666666 * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.16666666666666666 \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.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.7%
Simplified99.7%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
Simplified82.4%
+-commutativeN/A
distribute-rgt-inN/A
un-div-invN/A
div-invN/A
frac-addN/A
/-lowering-/.f64N/A
Applied egg-rr82.4%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
pow-plusN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified82.4%
Final simplification91.0%
(FPCore (x) :precision binary64 (/ (+ 1.0 (* x (* x (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.16666666666666666)))))))) E))
double code(double x) {
return (1.0 + (x * (x * (1.0 + ((x * x) * (0.5 + (x * (x * 0.16666666666666666)))))))) / ((double) M_E);
}
public static double code(double x) {
return (1.0 + (x * (x * (1.0 + ((x * x) * (0.5 + (x * (x * 0.16666666666666666)))))))) / Math.E;
}
def code(x): return (1.0 + (x * (x * (1.0 + ((x * x) * (0.5 + (x * (x * 0.16666666666666666)))))))) / math.e
function code(x) return Float64(Float64(1.0 + Float64(x * Float64(x * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.16666666666666666)))))))) / exp(1)) end
function tmp = code(x) tmp = (1.0 + (x * (x * (1.0 + ((x * x) * (0.5 + (x * (x * 0.16666666666666666)))))))) / 2.71828182845904523536; end
code[x_] := N[(N[(1.0 + N[(x * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 + x \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.16666666666666666\right)\right)\right)\right)}{e}
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified91.1%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr91.1%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (* (/ 1.0 E) (+ 1.0 (* x x))) (* (/ (* x x) E) (+ 1.0 (* (* x x) 0.5)))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * x));
} 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) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + (x * x));
} else {
tmp = ((x * x) / Math.E) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + (x * x)) else: tmp = ((x * x) / math.e) * (1.0 + ((x * x) * 0.5)) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * x))); 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) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * x)); 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], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * x), $MachinePrecision]), $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 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot x\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) < 5.00000000000000024e-5Initial program 100.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.7%
Simplified99.7%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified75.7%
Taylor expanded in x around inf
distribute-lft-inN/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
associate-/r*N/A
associate-*r/N/A
rgt-mult-inverseN/A
distribute-lft-inN/A
+-commutativeN/A
Simplified75.7%
Final simplification87.6%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (* (/ 1.0 E) (+ 1.0 (* x x))) (* x (* 0.5 (* x (/ (* x x) E))))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / ((double) M_E)) * (1.0 + (x * x));
} else {
tmp = x * (0.5 * (x * ((x * x) / ((double) M_E))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
tmp = (1.0 / Math.E) * (1.0 + (x * x));
} else {
tmp = x * (0.5 * (x * ((x * x) / Math.E)));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = (1.0 / math.e) * (1.0 + (x * x)) else: tmp = x * (0.5 * (x * ((x * x) / math.e))) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) tmp = Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * x))); else tmp = Float64(x * Float64(0.5 * Float64(x * Float64(Float64(x * x) / exp(1))))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if ((x * x) <= 5e-5) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * x)); else tmp = x * (0.5 * (x * ((x * x) / 2.71828182845904523536))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(x * N[(N[(x * x), $MachinePrecision] / E), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e} \cdot \left(1 + x \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.5 \cdot \left(x \cdot \frac{x \cdot x}{e}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.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.7%
Simplified99.7%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-+l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified75.7%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*r/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
Simplified75.7%
Final simplification87.6%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (/ 1.0 E) (/ 1.0 (/ E (* x x)))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
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) <= 5e-5) {
tmp = 1.0 / Math.E;
} else {
tmp = 1.0 / (Math.E / (x * x));
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: 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) <= 5e-5) 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) <= 5e-5) 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], 5e-5], 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 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{e}{x \cdot x}}\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6498.8%
Simplified98.8%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
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-*.f6448.6%
Simplified48.6%
Taylor expanded in x around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
E-lowering-E.f6448.6%
Simplified48.6%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
E-lowering-E.f64N/A
*-lowering-*.f6448.6%
Applied egg-rr48.6%
(FPCore (x) :precision binary64 (if (<= (* x x) 5e-5) (/ 1.0 E) (* x (/ x E))))
double code(double x) {
double tmp;
if ((x * x) <= 5e-5) {
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) <= 5e-5) {
tmp = 1.0 / Math.E;
} else {
tmp = x * (x / Math.E);
}
return tmp;
}
def code(x): tmp = 0 if (x * x) <= 5e-5: tmp = 1.0 / math.e else: tmp = x * (x / math.e) return tmp
function code(x) tmp = 0.0 if (Float64(x * x) <= 5e-5) 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) <= 5e-5) tmp = 1.0 / 2.71828182845904523536; else tmp = x * (x / 2.71828182845904523536); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-5], N[(1.0 / E), $MachinePrecision], N[(x * N[(x / E), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{e}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{x}{e}\\
\end{array}
\end{array}
if (*.f64 x x) < 5.00000000000000024e-5Initial program 100.0%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6498.8%
Simplified98.8%
if 5.00000000000000024e-5 < (*.f64 x x) Initial program 99.9%
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-*.f6448.6%
Simplified48.6%
Taylor expanded in x around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
E-lowering-E.f6448.6%
Simplified48.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
E-lowering-E.f6448.6%
Applied egg-rr48.6%
Final simplification73.5%
(FPCore (x) :precision binary64 (* (/ 1.0 E) (+ 1.0 (* x x))))
double code(double x) {
return (1.0 / ((double) M_E)) * (1.0 + (x * x));
}
public static double code(double x) {
return (1.0 / Math.E) * (1.0 + (x * x));
}
def code(x): return (1.0 / math.e) * (1.0 + (x * x))
function code(x) return Float64(Float64(1.0 / exp(1)) * Float64(1.0 + Float64(x * x))) end
function tmp = code(x) tmp = (1.0 / 2.71828182845904523536) * (1.0 + (x * x)); end
code[x_] := N[(N[(1.0 / E), $MachinePrecision] * N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{e} \cdot \left(1 + x \cdot x\right)
\end{array}
Initial program 100.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-*.f6473.9%
Simplified73.9%
Final simplification73.9%
(FPCore (x) :precision binary64 (/ (+ 1.0 (* x x)) E))
double code(double x) {
return (1.0 + (x * x)) / ((double) M_E);
}
public static double code(double x) {
return (1.0 + (x * x)) / Math.E;
}
def code(x): return (1.0 + (x * x)) / math.e
function code(x) return Float64(Float64(1.0 + Float64(x * x)) / exp(1)) end
function tmp = code(x) tmp = (1.0 + (x * x)) / 2.71828182845904523536; end
code[x_] := N[(N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision] / E), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 + x \cdot x}{e}
\end{array}
Initial program 100.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-*.f6473.9%
Simplified73.9%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
E-lowering-E.f6473.9%
Applied egg-rr73.9%
Final simplification73.9%
(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%
Taylor expanded in x around 0
metadata-evalN/A
rec-expN/A
/-lowering-/.f64N/A
exp-1-eN/A
E-lowering-E.f6450.6%
Simplified50.6%
herbie shell --seed 2024185
(FPCore (x)
:name "exp neg sub"
:precision binary64
(exp (- (- 1.0 (* x x)))))