
(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
double code(double x, double eps) {
return pow((x + eps), 5.0) - pow(x, 5.0);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = ((x + eps) ** 5.0d0) - (x ** 5.0d0)
end function
public static double code(double x, double eps) {
return Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
}
def code(x, eps): return math.pow((x + eps), 5.0) - math.pow(x, 5.0)
function code(x, eps) return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0)) end
function tmp = code(x, eps) tmp = ((x + eps) ^ 5.0) - (x ^ 5.0); end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
double code(double x, double eps) {
return pow((x + eps), 5.0) - pow(x, 5.0);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = ((x + eps) ** 5.0d0) - (x ** 5.0d0)
end function
public static double code(double x, double eps) {
return Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
}
def code(x, eps): return math.pow((x + eps), 5.0) - math.pow(x, 5.0)
function code(x, eps) return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0)) end
function tmp = code(x, eps) tmp = ((x + eps) ^ 5.0) - (x ^ 5.0); end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
\end{array}
(FPCore (x eps)
:precision binary64
(let* ((t_0 (- (pow (+ eps x) 5.0) (pow x 5.0))))
(if (<= t_0 -1e-315)
t_0
(if (<= t_0 0.0)
(* (* (pow x 4.0) 5.0) eps)
(*
(pow eps 5.0)
(+
(/ (fma 5.0 x (/ (* 8.0 (* x x)) eps)) eps)
(fma (/ (* x x) eps) (/ 2.0 eps) 1.0)))))))
double code(double x, double eps) {
double t_0 = pow((eps + x), 5.0) - pow(x, 5.0);
double tmp;
if (t_0 <= -1e-315) {
tmp = t_0;
} else if (t_0 <= 0.0) {
tmp = (pow(x, 4.0) * 5.0) * eps;
} else {
tmp = pow(eps, 5.0) * ((fma(5.0, x, ((8.0 * (x * x)) / eps)) / eps) + fma(((x * x) / eps), (2.0 / eps), 1.0));
}
return tmp;
}
function code(x, eps) t_0 = Float64((Float64(eps + x) ^ 5.0) - (x ^ 5.0)) tmp = 0.0 if (t_0 <= -1e-315) tmp = t_0; elseif (t_0 <= 0.0) tmp = Float64(Float64((x ^ 4.0) * 5.0) * eps); else tmp = Float64((eps ^ 5.0) * Float64(Float64(fma(5.0, x, Float64(Float64(8.0 * Float64(x * x)) / eps)) / eps) + fma(Float64(Float64(x * x) / eps), Float64(2.0 / eps), 1.0))); end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-315], t$95$0, If[LessEqual[t$95$0, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * 5.0), $MachinePrecision] * eps), $MachinePrecision], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(N[(N[(5.0 * x + N[(N[(8.0 * N[(x * x), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision]), $MachinePrecision] / eps), $MachinePrecision] + N[(N[(N[(x * x), $MachinePrecision] / eps), $MachinePrecision] * N[(2.0 / eps), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\varepsilon + x\right)}^{5} - {x}^{5}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-315}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\left({x}^{4} \cdot 5\right) \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(\frac{\mathsf{fma}\left(5, x, \frac{8 \cdot \left(x \cdot x\right)}{\varepsilon}\right)}{\varepsilon} + \mathsf{fma}\left(\frac{x \cdot x}{\varepsilon}, \frac{2}{\varepsilon}, 1\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.999999985e-316Initial program 94.3%
if -9.999999985e-316 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0Initial program 87.7%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) Initial program 99.9%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites100.0%
Final simplification99.3%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(* (fma (* 10.0 eps) (* (* x x) (+ eps x)) (* (pow x 4.0) 5.0)) eps)))
(if (<= x -1.1e-48)
t_0
(if (<= x 5.1e-61) (* (fma (/ x eps) 5.0 1.0) (pow eps 5.0)) t_0))))
double code(double x, double eps) {
double t_0 = fma((10.0 * eps), ((x * x) * (eps + x)), (pow(x, 4.0) * 5.0)) * eps;
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, eps) t_0 = Float64(fma(Float64(10.0 * eps), Float64(Float64(x * x) * Float64(eps + x)), Float64((x ^ 4.0) * 5.0)) * eps) tmp = 0.0 if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0)); else tmp = t_0; end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(10.0 * eps), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(eps + x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[x, 4.0], $MachinePrecision] * 5.0), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], t$95$0, If[LessEqual[x, 5.1e-61], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(10 \cdot \varepsilon, \left(x \cdot x\right) \cdot \left(\varepsilon + x\right), {x}^{4} \cdot 5\right) \cdot \varepsilon\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48 or 5.09999999999999968e-61 < x Initial program 41.7%
Taylor expanded in x around inf
Applied rewrites95.5%
Taylor expanded in eps around 0
Applied rewrites95.5%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
(FPCore (x eps)
:precision binary64
(if (<= x -1.1e-48)
(* (* (fma 10.0 eps (* 5.0 x)) eps) (pow x 3.0))
(if (<= x 5.1e-61)
(* (fma (/ x eps) 5.0 1.0) (pow eps 5.0))
(* (fma (* eps eps) (/ 10.0 x) (* 5.0 eps)) (pow x 4.0)))))
double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = (fma(10.0, eps, (5.0 * x)) * eps) * pow(x, 3.0);
} else if (x <= 5.1e-61) {
tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
} else {
tmp = fma((eps * eps), (10.0 / x), (5.0 * eps)) * pow(x, 4.0);
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * (x ^ 3.0)); elseif (x <= 5.1e-61) tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0)); else tmp = Float64(fma(Float64(eps * eps), Float64(10.0 / x), Float64(5.0 * eps)) * (x ^ 4.0)); end return tmp end
code[x_, eps_] := If[LessEqual[x, -1.1e-48], N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(eps * eps), $MachinePrecision] * N[(10.0 / x), $MachinePrecision] + N[(5.0 * eps), $MachinePrecision]), $MachinePrecision] * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot {x}^{3}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\varepsilon \cdot \varepsilon, \frac{10}{x}, 5 \cdot \varepsilon\right) \cdot {x}^{4}\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.2%
Taylor expanded in x around 0
Applied rewrites92.2%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
Applied rewrites99.3%
Final simplification99.1%
(FPCore (x eps)
:precision binary64
(if (<= x -1.1e-48)
(* (* (fma 10.0 eps (* 5.0 x)) eps) (pow x 3.0))
(if (<= x 5.1e-61)
(* (fma (/ x eps) 5.0 1.0) (pow eps 5.0))
(* (* (fma (/ eps x) 10.0 5.0) eps) (pow x 4.0)))))
double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = (fma(10.0, eps, (5.0 * x)) * eps) * pow(x, 3.0);
} else if (x <= 5.1e-61) {
tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
} else {
tmp = (fma((eps / x), 10.0, 5.0) * eps) * pow(x, 4.0);
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * (x ^ 3.0)); elseif (x <= 5.1e-61) tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0)); else tmp = Float64(Float64(fma(Float64(eps / x), 10.0, 5.0) * eps) * (x ^ 4.0)); end return tmp end
code[x_, eps_] := If[LessEqual[x, -1.1e-48], N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(eps / x), $MachinePrecision] * 10.0 + 5.0), $MachinePrecision] * eps), $MachinePrecision] * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot {x}^{3}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{\varepsilon}{x}, 10, 5\right) \cdot \varepsilon\right) \cdot {x}^{4}\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.2%
Taylor expanded in x around 0
Applied rewrites92.2%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6445.4
Applied rewrites45.4%
Taylor expanded in x around inf
*-commutativeN/A
Applied rewrites99.3%
Final simplification99.1%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (fma 10.0 eps (* 5.0 x)) eps)))
(if (<= x -1.1e-48)
(* t_0 (pow x 3.0))
(if (<= x 5.1e-61)
(* (fma (/ x eps) 5.0 1.0) (pow eps 5.0))
(* (* t_0 x) (* x x))))))
double code(double x, double eps) {
double t_0 = fma(10.0, eps, (5.0 * x)) * eps;
double tmp;
if (x <= -1.1e-48) {
tmp = t_0 * pow(x, 3.0);
} else if (x <= 5.1e-61) {
tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
} else {
tmp = (t_0 * x) * (x * x);
}
return tmp;
}
function code(x, eps) t_0 = Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(t_0 * (x ^ 3.0)); elseif (x <= 5.1e-61) tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0)); else tmp = Float64(Float64(t_0 * x) * Float64(x * x)); end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], N[(t$95$0 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0 \cdot {x}^{3}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot x\right) \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.2%
Taylor expanded in x around 0
Applied rewrites92.2%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites99.1%
Final simplification99.1%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (fma 10.0 eps (* 5.0 x)) eps)))
(if (<= x -1.1e-48)
(* t_0 (pow x 3.0))
(if (<= x 5.1e-61)
(* (pow eps 4.0) (fma 5.0 x eps))
(* (* t_0 x) (* x x))))))
double code(double x, double eps) {
double t_0 = fma(10.0, eps, (5.0 * x)) * eps;
double tmp;
if (x <= -1.1e-48) {
tmp = t_0 * pow(x, 3.0);
} else if (x <= 5.1e-61) {
tmp = pow(eps, 4.0) * fma(5.0, x, eps);
} else {
tmp = (t_0 * x) * (x * x);
}
return tmp;
}
function code(x, eps) t_0 = Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(t_0 * (x ^ 3.0)); elseif (x <= 5.1e-61) tmp = Float64((eps ^ 4.0) * fma(5.0, x, eps)); else tmp = Float64(Float64(t_0 * x) * Float64(x * x)); end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], N[(t$95$0 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[Power[eps, 4.0], $MachinePrecision] * N[(5.0 * x + eps), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0 \cdot {x}^{3}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{4} \cdot \mathsf{fma}\left(5, x, \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot x\right) \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.2%
Taylor expanded in x around 0
Applied rewrites92.2%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites99.1%
Final simplification99.0%
(FPCore (x eps)
:precision binary64
(if (<= x -1.1e-48)
(* (* (fma 10.0 (/ (* eps eps) x) (* 5.0 eps)) (* x x)) (* x x))
(if (<= x 5.1e-61)
(* (pow eps 4.0) (fma 5.0 x eps))
(* (* (* (fma 10.0 eps (* 5.0 x)) eps) x) (* x x)))))
double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = (fma(10.0, ((eps * eps) / x), (5.0 * eps)) * (x * x)) * (x * x);
} else if (x <= 5.1e-61) {
tmp = pow(eps, 4.0) * fma(5.0, x, eps);
} else {
tmp = ((fma(10.0, eps, (5.0 * x)) * eps) * x) * (x * x);
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(Float64(fma(10.0, Float64(Float64(eps * eps) / x), Float64(5.0 * eps)) * Float64(x * x)) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64((eps ^ 4.0) * fma(5.0, x, eps)); else tmp = Float64(Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * x) * Float64(x * x)); end return tmp end
code[x_, eps_] := If[LessEqual[x, -1.1e-48], N[(N[(N[(10.0 * N[(N[(eps * eps), $MachinePrecision] / x), $MachinePrecision] + N[(5.0 * eps), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[Power[eps, 4.0], $MachinePrecision] * N[(5.0 * x + eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;\left(\mathsf{fma}\left(10, \frac{\varepsilon \cdot \varepsilon}{x}, 5 \cdot \varepsilon\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{4} \cdot \mathsf{fma}\left(5, x, \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites99.1%
Final simplification99.0%
(FPCore (x eps)
:precision binary64
(if (<= x -2.4e-48)
(* (* (fma 10.0 (/ (* eps eps) x) (* 5.0 eps)) (* x x)) (* x x))
(if (<= x 5.1e-61)
(* (* (fma (fma 5.0 x eps) eps (* 10.0 (* x x))) eps) (* eps eps))
(* (* (* (fma 10.0 eps (* 5.0 x)) eps) x) (* x x)))))
double code(double x, double eps) {
double tmp;
if (x <= -2.4e-48) {
tmp = (fma(10.0, ((eps * eps) / x), (5.0 * eps)) * (x * x)) * (x * x);
} else if (x <= 5.1e-61) {
tmp = (fma(fma(5.0, x, eps), eps, (10.0 * (x * x))) * eps) * (eps * eps);
} else {
tmp = ((fma(10.0, eps, (5.0 * x)) * eps) * x) * (x * x);
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -2.4e-48) tmp = Float64(Float64(fma(10.0, Float64(Float64(eps * eps) / x), Float64(5.0 * eps)) * Float64(x * x)) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(fma(fma(5.0, x, eps), eps, Float64(10.0 * Float64(x * x))) * eps) * Float64(eps * eps)); else tmp = Float64(Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * x) * Float64(x * x)); end return tmp end
code[x_, eps_] := If[LessEqual[x, -2.4e-48], N[(N[(N[(10.0 * N[(N[(eps * eps), $MachinePrecision] / x), $MachinePrecision] + N[(5.0 * eps), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps + N[(10.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;\left(\mathsf{fma}\left(10, \frac{\varepsilon \cdot \varepsilon}{x}, 5 \cdot \varepsilon\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, 10 \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -2.4e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
if -2.4e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites99.1%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (* (* (fma 10.0 eps (* 5.0 x)) eps) x) (* x x))))
(if (<= x -2.4e-48)
t_0
(if (<= x 5.1e-61)
(* (* (fma (fma 5.0 x eps) eps (* 10.0 (* x x))) eps) (* eps eps))
t_0))))
double code(double x, double eps) {
double t_0 = ((fma(10.0, eps, (5.0 * x)) * eps) * x) * (x * x);
double tmp;
if (x <= -2.4e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = (fma(fma(5.0, x, eps), eps, (10.0 * (x * x))) * eps) * (eps * eps);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, eps) t_0 = Float64(Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * x) * Float64(x * x)) tmp = 0.0 if (x <= -2.4e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = Float64(Float64(fma(fma(5.0, x, eps), eps, Float64(10.0 * Float64(x * x))) * eps) * Float64(eps * eps)); else tmp = t_0; end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e-48], t$95$0, If[LessEqual[x, 5.1e-61], N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps + N[(10.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, 10 \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.4e-48 or 5.09999999999999968e-61 < x Initial program 41.7%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.2%
Applied rewrites95.0%
Taylor expanded in x around 0
Applied rewrites95.0%
if -2.4e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (* (* (fma 10.0 eps (* 5.0 x)) eps) x) (* x x))))
(if (<= x -1.1e-48)
t_0
(if (<= x 5.1e-61) (* (* (* (* (fma 5.0 x eps) eps) eps) eps) eps) t_0))))
double code(double x, double eps) {
double t_0 = ((fma(10.0, eps, (5.0 * x)) * eps) * x) * (x * x);
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = (((fma(5.0, x, eps) * eps) * eps) * eps) * eps;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, eps) t_0 = Float64(Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * eps) * x) * Float64(x * x)) tmp = 0.0 if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(Float64(fma(5.0, x, eps) * eps) * eps) * eps) * eps); else tmp = t_0; end return tmp end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], t$95$0, If[LessEqual[x, 5.1e-61], N[(N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot \varepsilon\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48 or 5.09999999999999968e-61 < x Initial program 41.7%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.2%
Applied rewrites95.0%
Taylor expanded in x around 0
Applied rewrites95.0%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
Applied rewrites99.7%
Applied rewrites99.8%
Final simplification98.9%
(FPCore (x eps)
:precision binary64
(if (<= x -2.4e-48)
(* (* (* (* 5.0 eps) x) x) (* x x))
(if (<= x 5.1e-61)
(* (* (* (* (fma 5.0 x eps) eps) eps) eps) eps)
(* (* (* (* x x) 5.0) (* x x)) eps))))
double code(double x, double eps) {
double tmp;
if (x <= -2.4e-48) {
tmp = (((5.0 * eps) * x) * x) * (x * x);
} else if (x <= 5.1e-61) {
tmp = (((fma(5.0, x, eps) * eps) * eps) * eps) * eps;
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -2.4e-48) tmp = Float64(Float64(Float64(Float64(5.0 * eps) * x) * x) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(Float64(fma(5.0, x, eps) * eps) * eps) * eps) * eps); else tmp = Float64(Float64(Float64(Float64(x * x) * 5.0) * Float64(x * x)) * eps); end return tmp end
code[x_, eps_] := If[LessEqual[x, -2.4e-48], N[(N[(N[(N[(5.0 * eps), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;\left(\left(\left(5 \cdot \varepsilon\right) \cdot x\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
\end{array}
\end{array}
if x < -2.4e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
Applied rewrites90.7%
Taylor expanded in x around inf
Applied rewrites90.8%
if -2.4e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
Applied rewrites99.7%
Applied rewrites99.8%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6493.9
Applied rewrites93.9%
Applied rewrites93.7%
Final simplification98.4%
(FPCore (x eps)
:precision binary64
(if (<= x -2.4e-48)
(* (* (* (* 5.0 eps) x) x) (* x x))
(if (<= x 5.1e-61)
(* (* (* eps eps) (* eps eps)) (fma 5.0 x eps))
(* (* (* (* x x) 5.0) (* x x)) eps))))
double code(double x, double eps) {
double tmp;
if (x <= -2.4e-48) {
tmp = (((5.0 * eps) * x) * x) * (x * x);
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * (eps * eps)) * fma(5.0, x, eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -2.4e-48) tmp = Float64(Float64(Float64(Float64(5.0 * eps) * x) * x) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(eps * eps) * Float64(eps * eps)) * fma(5.0, x, eps)); else tmp = Float64(Float64(Float64(Float64(x * x) * 5.0) * Float64(x * x)) * eps); end return tmp end
code[x_, eps_] := If[LessEqual[x, -2.4e-48], N[(N[(N[(N[(5.0 * eps), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(eps * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision] * N[(5.0 * x + eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;\left(\left(\left(5 \cdot \varepsilon\right) \cdot x\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \mathsf{fma}\left(5, x, \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
\end{array}
\end{array}
if x < -2.4e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
Applied rewrites90.7%
Taylor expanded in x around inf
Applied rewrites90.8%
if -2.4e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
Applied rewrites99.8%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6493.9
Applied rewrites93.9%
Applied rewrites93.7%
Final simplification98.4%
(FPCore (x eps)
:precision binary64
(if (<= x -2.4e-48)
(* (* (* (* 5.0 eps) x) x) (* x x))
(if (<= x 5.1e-61)
(* (* (fma 5.0 x eps) (* eps eps)) (* eps eps))
(* (* (* (* x x) 5.0) (* x x)) eps))))
double code(double x, double eps) {
double tmp;
if (x <= -2.4e-48) {
tmp = (((5.0 * eps) * x) * x) * (x * x);
} else if (x <= 5.1e-61) {
tmp = (fma(5.0, x, eps) * (eps * eps)) * (eps * eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
function code(x, eps) tmp = 0.0 if (x <= -2.4e-48) tmp = Float64(Float64(Float64(Float64(5.0 * eps) * x) * x) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(fma(5.0, x, eps) * Float64(eps * eps)) * Float64(eps * eps)); else tmp = Float64(Float64(Float64(Float64(x * x) * 5.0) * Float64(x * x)) * eps); end return tmp end
code[x_, eps_] := If[LessEqual[x, -2.4e-48], N[(N[(N[(N[(5.0 * eps), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(5.0 * x + eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-48}:\\
\;\;\;\;\left(\left(\left(5 \cdot \varepsilon\right) \cdot x\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
\end{array}
\end{array}
if x < -2.4e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
Applied rewrites90.7%
Taylor expanded in x around inf
Applied rewrites90.8%
if -2.4e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
distribute-lft1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-pow.f6499.8
Applied rewrites99.8%
Applied rewrites99.7%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6493.9
Applied rewrites93.9%
Applied rewrites93.7%
Final simplification98.4%
(FPCore (x eps)
:precision binary64
(if (<= x -1.1e-48)
(* (* (* (* 5.0 eps) x) x) (* x x))
(if (<= x 5.1e-61)
(* (* (* eps eps) eps) (* eps eps))
(* (* (* (* x x) 5.0) (* x x)) eps))))
double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = (((5.0 * eps) * x) * x) * (x * x);
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.1d-48)) then
tmp = (((5.0d0 * eps) * x) * x) * (x * x)
else if (x <= 5.1d-61) then
tmp = ((eps * eps) * eps) * (eps * eps)
else
tmp = (((x * x) * 5.0d0) * (x * x)) * eps
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = (((5.0 * eps) * x) * x) * (x * x);
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.1e-48: tmp = (((5.0 * eps) * x) * x) * (x * x) elif x <= 5.1e-61: tmp = ((eps * eps) * eps) * (eps * eps) else: tmp = (((x * x) * 5.0) * (x * x)) * eps return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(Float64(Float64(Float64(5.0 * eps) * x) * x) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(eps * eps) * eps) * Float64(eps * eps)); else tmp = Float64(Float64(Float64(Float64(x * x) * 5.0) * Float64(x * x)) * eps); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.1e-48) tmp = (((5.0 * eps) * x) * x) * (x * x); elseif (x <= 5.1e-61) tmp = ((eps * eps) * eps) * (eps * eps); else tmp = (((x * x) * 5.0) * (x * x)) * eps; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.1e-48], N[(N[(N[(N[(5.0 * eps), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(eps * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;\left(\left(\left(5 \cdot \varepsilon\right) \cdot x\right) \cdot x\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
Applied rewrites90.7%
Taylor expanded in x around inf
Applied rewrites90.8%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites99.6%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6493.9
Applied rewrites93.9%
Applied rewrites93.7%
Final simplification98.2%
(FPCore (x eps)
:precision binary64
(if (<= x -1.1e-48)
(* (* (* 5.0 eps) (* x x)) (* x x))
(if (<= x 5.1e-61)
(* (* (* eps eps) eps) (* eps eps))
(* (* (* (* x x) 5.0) (* x x)) eps))))
double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = ((5.0 * eps) * (x * x)) * (x * x);
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.1d-48)) then
tmp = ((5.0d0 * eps) * (x * x)) * (x * x)
else if (x <= 5.1d-61) then
tmp = ((eps * eps) * eps) * (eps * eps)
else
tmp = (((x * x) * 5.0d0) * (x * x)) * eps
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.1e-48) {
tmp = ((5.0 * eps) * (x * x)) * (x * x);
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = (((x * x) * 5.0) * (x * x)) * eps;
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.1e-48: tmp = ((5.0 * eps) * (x * x)) * (x * x) elif x <= 5.1e-61: tmp = ((eps * eps) * eps) * (eps * eps) else: tmp = (((x * x) * 5.0) * (x * x)) * eps return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.1e-48) tmp = Float64(Float64(Float64(5.0 * eps) * Float64(x * x)) * Float64(x * x)); elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(eps * eps) * eps) * Float64(eps * eps)); else tmp = Float64(Float64(Float64(Float64(x * x) * 5.0) * Float64(x * x)) * eps); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.1e-48) tmp = ((5.0 * eps) * (x * x)) * (x * x); elseif (x <= 5.1e-61) tmp = ((eps * eps) * eps) * (eps * eps); else tmp = (((x * x) * 5.0) * (x * x)) * eps; end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.1e-48], N[(N[(N[(5.0 * eps), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-61], N[(N[(N[(eps * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;\left(\left(5 \cdot \varepsilon\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48Initial program 32.6%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.2%
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites90.8%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites99.6%
if 5.09999999999999968e-61 < x Initial program 54.0%
Taylor expanded in x around inf
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
lower-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f6493.9
Applied rewrites93.9%
Applied rewrites93.7%
Final simplification98.2%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (* (* 5.0 eps) (* x x)) (* x x))))
(if (<= x -1.1e-48)
t_0
(if (<= x 5.1e-61) (* (* (* eps eps) eps) (* eps eps)) t_0))))
double code(double x, double eps) {
double t_0 = ((5.0 * eps) * (x * x)) * (x * x);
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = ((5.0d0 * eps) * (x * x)) * (x * x)
if (x <= (-1.1d-48)) then
tmp = t_0
else if (x <= 5.1d-61) then
tmp = ((eps * eps) * eps) * (eps * eps)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = ((5.0 * eps) * (x * x)) * (x * x);
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = ((5.0 * eps) * (x * x)) * (x * x) tmp = 0 if x <= -1.1e-48: tmp = t_0 elif x <= 5.1e-61: tmp = ((eps * eps) * eps) * (eps * eps) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(Float64(Float64(5.0 * eps) * Float64(x * x)) * Float64(x * x)) tmp = 0.0 if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(eps * eps) * eps) * Float64(eps * eps)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = ((5.0 * eps) * (x * x)) * (x * x); tmp = 0.0; if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = ((eps * eps) * eps) * (eps * eps); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(5.0 * eps), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], t$95$0, If[LessEqual[x, 5.1e-61], N[(N[(N[(eps * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(5 \cdot \varepsilon\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48 or 5.09999999999999968e-61 < x Initial program 41.7%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.2%
Applied rewrites95.0%
Taylor expanded in x around inf
Applied rewrites92.0%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites99.6%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (* (* (* x x) 5.0) eps) (* x x))))
(if (<= x -1.1e-48)
t_0
(if (<= x 5.1e-61) (* (* (* eps eps) eps) (* eps eps)) t_0))))
double code(double x, double eps) {
double t_0 = (((x * x) * 5.0) * eps) * (x * x);
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = (((x * x) * 5.0d0) * eps) * (x * x)
if (x <= (-1.1d-48)) then
tmp = t_0
else if (x <= 5.1d-61) then
tmp = ((eps * eps) * eps) * (eps * eps)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = (((x * x) * 5.0) * eps) * (x * x);
double tmp;
if (x <= -1.1e-48) {
tmp = t_0;
} else if (x <= 5.1e-61) {
tmp = ((eps * eps) * eps) * (eps * eps);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = (((x * x) * 5.0) * eps) * (x * x) tmp = 0 if x <= -1.1e-48: tmp = t_0 elif x <= 5.1e-61: tmp = ((eps * eps) * eps) * (eps * eps) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(Float64(Float64(Float64(x * x) * 5.0) * eps) * Float64(x * x)) tmp = 0.0 if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = Float64(Float64(Float64(eps * eps) * eps) * Float64(eps * eps)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = (((x * x) * 5.0) * eps) * (x * x); tmp = 0.0; if (x <= -1.1e-48) tmp = t_0; elseif (x <= 5.1e-61) tmp = ((eps * eps) * eps) * (eps * eps); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * eps), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e-48], t$95$0, If[LessEqual[x, 5.1e-61], N[(N[(N[(eps * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot \varepsilon\right) \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-61}:\\
\;\;\;\;\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.10000000000000006e-48 or 5.09999999999999968e-61 < x Initial program 41.7%
Taylor expanded in x around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites95.2%
Applied rewrites95.0%
Taylor expanded in x around inf
Applied rewrites92.0%
if -1.10000000000000006e-48 < x < 5.09999999999999968e-61Initial program 100.0%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites94.8%
Taylor expanded in eps around 0
Applied rewrites99.9%
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites99.6%
(FPCore (x eps) :precision binary64 (* (* (* eps eps) eps) (* eps eps)))
double code(double x, double eps) {
return ((eps * eps) * eps) * (eps * eps);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = ((eps * eps) * eps) * (eps * eps)
end function
public static double code(double x, double eps) {
return ((eps * eps) * eps) * (eps * eps);
}
def code(x, eps): return ((eps * eps) * eps) * (eps * eps)
function code(x, eps) return Float64(Float64(Float64(eps * eps) * eps) * Float64(eps * eps)) end
function tmp = code(x, eps) tmp = ((eps * eps) * eps) * (eps * eps); end
code[x_, eps_] := N[(N[(N[(eps * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\varepsilon \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)
\end{array}
Initial program 89.7%
Taylor expanded in eps around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in eps around 0
Applied rewrites88.9%
Applied rewrites88.8%
Taylor expanded in x around 0
Applied rewrites88.6%
herbie shell --seed 2024298
(FPCore (x eps)
:name "ENA, Section 1.4, Exercise 4b, n=5"
:precision binary64
:pre (and (and (<= -1000000000.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))
(- (pow (+ x eps) 5.0) (pow x 5.0)))