
(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 22 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 (+ x eps) 5.0) (pow x 5.0))))
(if (<= t_0 -1e-309)
t_0
(if (<= t_0 0.0)
(* (pow x 4.0) (- (* eps 5.0) (/ (* (* eps eps) -10.0) x)))
t_0))))
double code(double x, double eps) {
double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
double tmp;
if (t_0 <= -1e-309) {
tmp = t_0;
} else if (t_0 <= 0.0) {
tmp = pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x));
} 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 + eps) ** 5.0d0) - (x ** 5.0d0)
if (t_0 <= (-1d-309)) then
tmp = t_0
else if (t_0 <= 0.0d0) then
tmp = (x ** 4.0d0) * ((eps * 5.0d0) - (((eps * eps) * (-10.0d0)) / x))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
double tmp;
if (t_0 <= -1e-309) {
tmp = t_0;
} else if (t_0 <= 0.0) {
tmp = Math.pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = math.pow((x + eps), 5.0) - math.pow(x, 5.0) tmp = 0 if t_0 <= -1e-309: tmp = t_0 elif t_0 <= 0.0: tmp = math.pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x)) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0)) tmp = 0.0 if (t_0 <= -1e-309) tmp = t_0; elseif (t_0 <= 0.0) tmp = Float64((x ^ 4.0) * Float64(Float64(eps * 5.0) - Float64(Float64(Float64(eps * eps) * -10.0) / x))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = ((x + eps) ^ 5.0) - (x ^ 5.0); tmp = 0.0; if (t_0 <= -1e-309) tmp = t_0; elseif (t_0 <= 0.0) tmp = (x ^ 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-309], t$95$0, If[LessEqual[t$95$0, 0.0], N[(N[Power[x, 4.0], $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] - N[(N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5 - \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -1.000000000000002e-309 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) Initial program 96.8%
if -1.000000000000002e-309 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0Initial program 83.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified99.9%
(FPCore (x eps)
:precision binary64
(if (<= x -1.4e-40)
(*
eps
(+
(* 5.0 (pow x 4.0))
(*
eps
(+
(* (* x (* x x)) 10.0)
(* eps (+ (* 5.0 (* x eps)) (* (* x x) 10.0)))))))
(if (<= x 4.9e-58)
(* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps))))
(*
(pow x 4.0)
(+
(+
(+ (/ (* eps (* eps 8.0)) x) (/ (* eps (* eps (* eps 4.0))) (* x x)))
(* eps (+ 4.0 (/ (/ (* eps (* eps 6.0)) x) x))))
(+ eps (/ (* eps (* eps 2.0)) x)))))))
double code(double x, double eps) {
double tmp;
if (x <= -1.4e-40) {
tmp = eps * ((5.0 * pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0))))));
} else if (x <= 4.9e-58) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = pow(x, 4.0) * (((((eps * (eps * 8.0)) / x) + ((eps * (eps * (eps * 4.0))) / (x * x))) + (eps * (4.0 + (((eps * (eps * 6.0)) / x) / x)))) + (eps + ((eps * (eps * 2.0)) / x)));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.4d-40)) then
tmp = eps * ((5.0d0 * (x ** 4.0d0)) + (eps * (((x * (x * x)) * 10.0d0) + (eps * ((5.0d0 * (x * eps)) + ((x * x) * 10.0d0))))))
else if (x <= 4.9d-58) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = (x ** 4.0d0) * (((((eps * (eps * 8.0d0)) / x) + ((eps * (eps * (eps * 4.0d0))) / (x * x))) + (eps * (4.0d0 + (((eps * (eps * 6.0d0)) / x) / x)))) + (eps + ((eps * (eps * 2.0d0)) / x)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.4e-40) {
tmp = eps * ((5.0 * Math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0))))));
} else if (x <= 4.9e-58) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = Math.pow(x, 4.0) * (((((eps * (eps * 8.0)) / x) + ((eps * (eps * (eps * 4.0))) / (x * x))) + (eps * (4.0 + (((eps * (eps * 6.0)) / x) / x)))) + (eps + ((eps * (eps * 2.0)) / x)));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.4e-40: tmp = eps * ((5.0 * math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0)))))) elif x <= 4.9e-58: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = math.pow(x, 4.0) * (((((eps * (eps * 8.0)) / x) + ((eps * (eps * (eps * 4.0))) / (x * x))) + (eps * (4.0 + (((eps * (eps * 6.0)) / x) / x)))) + (eps + ((eps * (eps * 2.0)) / x))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.4e-40) tmp = Float64(eps * Float64(Float64(5.0 * (x ^ 4.0)) + Float64(eps * Float64(Float64(Float64(x * Float64(x * x)) * 10.0) + Float64(eps * Float64(Float64(5.0 * Float64(x * eps)) + Float64(Float64(x * x) * 10.0))))))); elseif (x <= 4.9e-58) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = Float64((x ^ 4.0) * Float64(Float64(Float64(Float64(Float64(eps * Float64(eps * 8.0)) / x) + Float64(Float64(eps * Float64(eps * Float64(eps * 4.0))) / Float64(x * x))) + Float64(eps * Float64(4.0 + Float64(Float64(Float64(eps * Float64(eps * 6.0)) / x) / x)))) + Float64(eps + Float64(Float64(eps * Float64(eps * 2.0)) / x)))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.4e-40) tmp = eps * ((5.0 * (x ^ 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0)))))); elseif (x <= 4.9e-58) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = (x ^ 4.0) * (((((eps * (eps * 8.0)) / x) + ((eps * (eps * (eps * 4.0))) / (x * x))) + (eps * (4.0 + (((eps * (eps * 6.0)) / x) / x)))) + (eps + ((eps * (eps * 2.0)) / x))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.4e-40], N[(eps * N[(N[(5.0 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision] + N[(eps * N[(N[(5.0 * N[(x * eps), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.9e-58], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, 4.0], $MachinePrecision] * N[(N[(N[(N[(N[(eps * N[(eps * 8.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[(eps * N[(eps * N[(eps * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(4.0 + N[(N[(N[(eps * N[(eps * 6.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps + N[(N[(eps * N[(eps * 2.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-40}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4} + \varepsilon \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 10 + \varepsilon \cdot \left(5 \cdot \left(x \cdot \varepsilon\right) + \left(x \cdot x\right) \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{-58}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;{x}^{4} \cdot \left(\left(\left(\frac{\varepsilon \cdot \left(\varepsilon \cdot 8\right)}{x} + \frac{\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot 4\right)\right)}{x \cdot x}\right) + \varepsilon \cdot \left(4 + \frac{\frac{\varepsilon \cdot \left(\varepsilon \cdot 6\right)}{x}}{x}\right)\right) + \left(\varepsilon + \frac{\varepsilon \cdot \left(\varepsilon \cdot 2\right)}{x}\right)\right)\\
\end{array}
\end{array}
if x < -1.4e-40Initial program 26.8%
Taylor expanded in eps around 0
Simplified93.0%
if -1.4e-40 < x < 4.9000000000000003e-58Initial program 98.5%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6498.3%
Simplified98.3%
if 4.9000000000000003e-58 < x Initial program 32.9%
Taylor expanded in x around inf
Simplified99.6%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(*
eps
(+
(* 5.0 (pow x 4.0))
(*
eps
(+
(* (* x (* x x)) 10.0)
(* eps (+ (* 5.0 (* x eps)) (* (* x x) 10.0)))))))))
(if (<= x -1.3e-40)
t_0
(if (<= x 9e-55) (* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps)))) t_0))))
double code(double x, double eps) {
double t_0 = eps * ((5.0 * pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0))))));
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 9e-55) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / 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 = eps * ((5.0d0 * (x ** 4.0d0)) + (eps * (((x * (x * x)) * 10.0d0) + (eps * ((5.0d0 * (x * eps)) + ((x * x) * 10.0d0))))))
if (x <= (-1.3d-40)) then
tmp = t_0
else if (x <= 9d-55) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * ((5.0 * Math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0))))));
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 9e-55) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * ((5.0 * math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0)))))) tmp = 0 if x <= -1.3e-40: tmp = t_0 elif x <= 9e-55: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(Float64(5.0 * (x ^ 4.0)) + Float64(eps * Float64(Float64(Float64(x * Float64(x * x)) * 10.0) + Float64(eps * Float64(Float64(5.0 * Float64(x * eps)) + Float64(Float64(x * x) * 10.0))))))) tmp = 0.0 if (x <= -1.3e-40) tmp = t_0; elseif (x <= 9e-55) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * ((5.0 * (x ^ 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * ((5.0 * (x * eps)) + ((x * x) * 10.0)))))); tmp = 0.0; if (x <= -1.3e-40) tmp = t_0; elseif (x <= 9e-55) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(N[(5.0 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision] + N[(eps * N[(N[(5.0 * N[(x * eps), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e-40], t$95$0, If[LessEqual[x, 9e-55], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot {x}^{4} + \varepsilon \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 10 + \varepsilon \cdot \left(5 \cdot \left(x \cdot \varepsilon\right) + \left(x \cdot x\right) \cdot 10\right)\right)\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-55}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.3000000000000001e-40 or 8.99999999999999941e-55 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
if -1.3000000000000001e-40 < x < 8.99999999999999941e-55Initial program 98.5%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6498.3%
Simplified98.3%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* eps eps))))
(if (<= x -1.35e-40)
(*
x
(+
(* 5.0 (* eps t_0))
(* x (+ (* 10.0 (* eps (* eps (+ x eps)))) (* x (* eps (* x 5.0)))))))
(if (<= x 1.1e-56)
(* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps))))
(*
(pow x 4.0)
(+ (* eps 5.0) (/ (- (/ (* 10.0 t_0) x) (* (* eps eps) -10.0)) x)))))))
double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double tmp;
if (x <= -1.35e-40) {
tmp = x * ((5.0 * (eps * t_0)) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 1.1e-56) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * t_0) / x) - ((eps * eps) * -10.0)) / x));
}
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 = eps * (eps * eps)
if (x <= (-1.35d-40)) then
tmp = x * ((5.0d0 * (eps * t_0)) + (x * ((10.0d0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0d0))))))
else if (x <= 1.1d-56) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = (x ** 4.0d0) * ((eps * 5.0d0) + ((((10.0d0 * t_0) / x) - ((eps * eps) * (-10.0d0))) / x))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double tmp;
if (x <= -1.35e-40) {
tmp = x * ((5.0 * (eps * t_0)) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 1.1e-56) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = Math.pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * t_0) / x) - ((eps * eps) * -10.0)) / x));
}
return tmp;
}
def code(x, eps): t_0 = eps * (eps * eps) tmp = 0 if x <= -1.35e-40: tmp = x * ((5.0 * (eps * t_0)) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))) elif x <= 1.1e-56: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = math.pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * t_0) / x) - ((eps * eps) * -10.0)) / x)) return tmp
function code(x, eps) t_0 = Float64(eps * Float64(eps * eps)) tmp = 0.0 if (x <= -1.35e-40) tmp = Float64(x * Float64(Float64(5.0 * Float64(eps * t_0)) + Float64(x * Float64(Float64(10.0 * Float64(eps * Float64(eps * Float64(x + eps)))) + Float64(x * Float64(eps * Float64(x * 5.0))))))); elseif (x <= 1.1e-56) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = Float64((x ^ 4.0) * Float64(Float64(eps * 5.0) + Float64(Float64(Float64(Float64(10.0 * t_0) / x) - Float64(Float64(eps * eps) * -10.0)) / x))); end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (eps * eps); tmp = 0.0; if (x <= -1.35e-40) tmp = x * ((5.0 * (eps * t_0)) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))); elseif (x <= 1.1e-56) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = (x ^ 4.0) * ((eps * 5.0) + ((((10.0 * t_0) / x) - ((eps * eps) * -10.0)) / x)); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-40], N[(x * N[(N[(5.0 * N[(eps * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(10.0 * N[(eps * N[(eps * N[(x + eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e-56], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, 4.0], $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(N[(N[(N[(10.0 * t$95$0), $MachinePrecision] / x), $MachinePrecision] - N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;x \cdot \left(5 \cdot \left(\varepsilon \cdot t\_0\right) + x \cdot \left(10 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(x + \varepsilon\right)\right)\right) + x \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-56}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5 + \frac{\frac{10 \cdot t\_0}{x} - \left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right)\\
\end{array}
\end{array}
if x < -1.35e-40Initial program 26.8%
Taylor expanded in eps around 0
Simplified93.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr92.7%
Taylor expanded in x around 0
Simplified92.8%
if -1.35e-40 < x < 1.10000000000000002e-56Initial program 98.5%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6498.3%
Simplified98.3%
if 1.10000000000000002e-56 < x Initial program 32.9%
Taylor expanded in x around -inf
Simplified99.6%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(if (<= x -1.45e-40)
(*
x
(+
(* 5.0 (* eps (* eps (* eps eps))))
(* x (+ (* 10.0 (* eps (* eps (+ x eps)))) (* x (* eps (* x 5.0)))))))
(if (<= x 5.2e-52)
(* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps))))
(*
eps
(*
x
(+
(* (* eps eps) (+ (* eps 5.0) (* x 10.0)))
(* x (* x (+ (* x 5.0) (* eps 10.0))))))))))
double code(double x, double eps) {
double tmp;
if (x <= -1.45e-40) {
tmp = x * ((5.0 * (eps * (eps * (eps * eps)))) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 5.2e-52) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.45d-40)) then
tmp = x * ((5.0d0 * (eps * (eps * (eps * eps)))) + (x * ((10.0d0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0d0))))))
else if (x <= 5.2d-52) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = eps * (x * (((eps * eps) * ((eps * 5.0d0) + (x * 10.0d0))) + (x * (x * ((x * 5.0d0) + (eps * 10.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.45e-40) {
tmp = x * ((5.0 * (eps * (eps * (eps * eps)))) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 5.2e-52) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.45e-40: tmp = x * ((5.0 * (eps * (eps * (eps * eps)))) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))) elif x <= 5.2e-52: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.45e-40) tmp = Float64(x * Float64(Float64(5.0 * Float64(eps * Float64(eps * Float64(eps * eps)))) + Float64(x * Float64(Float64(10.0 * Float64(eps * Float64(eps * Float64(x + eps)))) + Float64(x * Float64(eps * Float64(x * 5.0))))))); elseif (x <= 5.2e-52) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = Float64(eps * Float64(x * Float64(Float64(Float64(eps * eps) * Float64(Float64(eps * 5.0) + Float64(x * 10.0))) + Float64(x * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.45e-40) tmp = x * ((5.0 * (eps * (eps * (eps * eps)))) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))); elseif (x <= 5.2e-52) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.45e-40], N[(x * N[(N[(5.0 * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(10.0 * N[(eps * N[(eps * N[(x + eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e-52], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(x * N[(N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-40}:\\
\;\;\;\;x \cdot \left(5 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) + x \cdot \left(10 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(x + \varepsilon\right)\right)\right) + x \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-52}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right) + x \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.4499999999999999e-40Initial program 26.8%
Taylor expanded in eps around 0
Simplified93.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr92.7%
Taylor expanded in x around 0
Simplified92.8%
if -1.4499999999999999e-40 < x < 5.1999999999999997e-52Initial program 98.5%
Taylor expanded in eps around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6498.3%
Simplified98.3%
if 5.1999999999999997e-52 < x Initial program 32.9%
Taylor expanded in eps around 0
Simplified99.6%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
distribute-rgt-inN/A
associate-*r*N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified99.5%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* eps eps))) (t_1 (* eps t_0)))
(if (<= x -7e-40)
(*
x
(+
(* 5.0 t_1)
(* x (+ (* 10.0 (* eps (* eps (+ x eps)))) (* x (* eps (* x 5.0)))))))
(if (<= x 1.15e-46)
(+ (* t_1 (+ eps (* x 5.0))) (* (* x x) (* 10.0 t_0)))
(*
eps
(*
x
(+
(* (* eps eps) (+ (* eps 5.0) (* x 10.0)))
(* x (* x (+ (* x 5.0) (* eps 10.0)))))))))))
double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double t_1 = eps * t_0;
double tmp;
if (x <= -7e-40) {
tmp = x * ((5.0 * t_1) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 1.15e-46) {
tmp = (t_1 * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = eps * (eps * eps)
t_1 = eps * t_0
if (x <= (-7d-40)) then
tmp = x * ((5.0d0 * t_1) + (x * ((10.0d0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0d0))))))
else if (x <= 1.15d-46) then
tmp = (t_1 * (eps + (x * 5.0d0))) + ((x * x) * (10.0d0 * t_0))
else
tmp = eps * (x * (((eps * eps) * ((eps * 5.0d0) + (x * 10.0d0))) + (x * (x * ((x * 5.0d0) + (eps * 10.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double t_1 = eps * t_0;
double tmp;
if (x <= -7e-40) {
tmp = x * ((5.0 * t_1) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0))))));
} else if (x <= 1.15e-46) {
tmp = (t_1 * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
}
return tmp;
}
def code(x, eps): t_0 = eps * (eps * eps) t_1 = eps * t_0 tmp = 0 if x <= -7e-40: tmp = x * ((5.0 * t_1) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))) elif x <= 1.15e-46: tmp = (t_1 * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0)) else: tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))) return tmp
function code(x, eps) t_0 = Float64(eps * Float64(eps * eps)) t_1 = Float64(eps * t_0) tmp = 0.0 if (x <= -7e-40) tmp = Float64(x * Float64(Float64(5.0 * t_1) + Float64(x * Float64(Float64(10.0 * Float64(eps * Float64(eps * Float64(x + eps)))) + Float64(x * Float64(eps * Float64(x * 5.0))))))); elseif (x <= 1.15e-46) tmp = Float64(Float64(t_1 * Float64(eps + Float64(x * 5.0))) + Float64(Float64(x * x) * Float64(10.0 * t_0))); else tmp = Float64(eps * Float64(x * Float64(Float64(Float64(eps * eps) * Float64(Float64(eps * 5.0) + Float64(x * 10.0))) + Float64(x * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))))); end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (eps * eps); t_1 = eps * t_0; tmp = 0.0; if (x <= -7e-40) tmp = x * ((5.0 * t_1) + (x * ((10.0 * (eps * (eps * (x + eps)))) + (x * (eps * (x * 5.0)))))); elseif (x <= 1.15e-46) tmp = (t_1 * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0)); else tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(eps * t$95$0), $MachinePrecision]}, If[LessEqual[x, -7e-40], N[(x * N[(N[(5.0 * t$95$1), $MachinePrecision] + N[(x * N[(N[(10.0 * N[(eps * N[(eps * N[(x + eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-46], N[(N[(t$95$1 * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(10.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(x * N[(N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\\
t_1 := \varepsilon \cdot t\_0\\
\mathbf{if}\;x \leq -7 \cdot 10^{-40}:\\
\;\;\;\;x \cdot \left(5 \cdot t\_1 + x \cdot \left(10 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(x + \varepsilon\right)\right)\right) + x \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-46}:\\
\;\;\;\;t\_1 \cdot \left(\varepsilon + x \cdot 5\right) + \left(x \cdot x\right) \cdot \left(10 \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right) + x \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -7.0000000000000003e-40Initial program 26.8%
Taylor expanded in eps around 0
Simplified93.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr92.7%
Taylor expanded in x around 0
Simplified92.8%
if -7.0000000000000003e-40 < x < 1.15e-46Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
+-commutativeN/A
distribute-lft-inN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
Applied egg-rr98.3%
if 1.15e-46 < x Initial program 32.9%
Taylor expanded in eps around 0
Simplified99.6%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
distribute-rgt-inN/A
associate-*r*N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified99.5%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* eps eps))))
(if (<= x -2.2e-40)
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(* eps (* x (+ (* 5.0 (* eps eps)) (* 10.0 (* x (+ x eps))))))))
(if (<= x 2.65e-55)
(+ (* (* eps t_0) (+ eps (* x 5.0))) (* (* x x) (* 10.0 t_0)))
(*
eps
(*
x
(+
(* (* eps eps) (+ (* eps 5.0) (* x 10.0)))
(* x (* x (+ (* x 5.0) (* eps 10.0)))))))))))
double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double tmp;
if (x <= -2.2e-40) {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (x * ((5.0 * (eps * eps)) + (10.0 * (x * (x + eps)))))));
} else if (x <= 2.65e-55) {
tmp = ((eps * t_0) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.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 = eps * (eps * eps)
if (x <= (-2.2d-40)) then
tmp = eps * ((5.0d0 * (x * (x * (x * x)))) + (eps * (x * ((5.0d0 * (eps * eps)) + (10.0d0 * (x * (x + eps)))))))
else if (x <= 2.65d-55) then
tmp = ((eps * t_0) * (eps + (x * 5.0d0))) + ((x * x) * (10.0d0 * t_0))
else
tmp = eps * (x * (((eps * eps) * ((eps * 5.0d0) + (x * 10.0d0))) + (x * (x * ((x * 5.0d0) + (eps * 10.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (eps * eps);
double tmp;
if (x <= -2.2e-40) {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (x * ((5.0 * (eps * eps)) + (10.0 * (x * (x + eps)))))));
} else if (x <= 2.65e-55) {
tmp = ((eps * t_0) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0));
} else {
tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
}
return tmp;
}
def code(x, eps): t_0 = eps * (eps * eps) tmp = 0 if x <= -2.2e-40: tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (x * ((5.0 * (eps * eps)) + (10.0 * (x * (x + eps))))))) elif x <= 2.65e-55: tmp = ((eps * t_0) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0)) else: tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))) return tmp
function code(x, eps) t_0 = Float64(eps * Float64(eps * eps)) tmp = 0.0 if (x <= -2.2e-40) tmp = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(eps * Float64(x * Float64(Float64(5.0 * Float64(eps * eps)) + Float64(10.0 * Float64(x * Float64(x + eps)))))))); elseif (x <= 2.65e-55) tmp = Float64(Float64(Float64(eps * t_0) * Float64(eps + Float64(x * 5.0))) + Float64(Float64(x * x) * Float64(10.0 * t_0))); else tmp = Float64(eps * Float64(x * Float64(Float64(Float64(eps * eps) * Float64(Float64(eps * 5.0) + Float64(x * 10.0))) + Float64(x * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))))); end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (eps * eps); tmp = 0.0; if (x <= -2.2e-40) tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (x * ((5.0 * (eps * eps)) + (10.0 * (x * (x + eps))))))); elseif (x <= 2.65e-55) tmp = ((eps * t_0) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_0)); else tmp = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e-40], N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(x * N[(N[(5.0 * N[(eps * eps), $MachinePrecision]), $MachinePrecision] + N[(10.0 * N[(x * N[(x + eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.65e-55], N[(N[(N[(eps * t$95$0), $MachinePrecision] * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(10.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(x * N[(N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{-40}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \varepsilon \cdot \left(x \cdot \left(5 \cdot \left(\varepsilon \cdot \varepsilon\right) + 10 \cdot \left(x \cdot \left(x + \varepsilon\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{-55}:\\
\;\;\;\;\left(\varepsilon \cdot t\_0\right) \cdot \left(\varepsilon + x \cdot 5\right) + \left(x \cdot x\right) \cdot \left(10 \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right) + x \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.20000000000000009e-40Initial program 26.8%
Taylor expanded in eps around 0
Simplified93.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr92.7%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
distribute-rgt-inN/A
Simplified92.7%
if -2.20000000000000009e-40 < x < 2.6500000000000001e-55Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
+-commutativeN/A
distribute-lft-inN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
Applied egg-rr98.3%
if 2.6500000000000001e-55 < x Initial program 32.9%
Taylor expanded in eps around 0
Simplified99.6%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
distribute-rgt-inN/A
associate-*r*N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified99.5%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(*
eps
(*
x
(+
(* (* eps eps) (+ (* eps 5.0) (* x 10.0)))
(* x (* x (+ (* x 5.0) (* eps 10.0))))))))
(t_1 (* eps (* eps eps))))
(if (<= x -1.3e-40)
t_0
(if (<= x 1.05e-54)
(+ (* (* eps t_1) (+ eps (* x 5.0))) (* (* x x) (* 10.0 t_1)))
t_0))))
double code(double x, double eps) {
double t_0 = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
double t_1 = eps * (eps * eps);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.05e-54) {
tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1));
} 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) :: t_1
real(8) :: tmp
t_0 = eps * (x * (((eps * eps) * ((eps * 5.0d0) + (x * 10.0d0))) + (x * (x * ((x * 5.0d0) + (eps * 10.0d0))))))
t_1 = eps * (eps * eps)
if (x <= (-1.3d-40)) then
tmp = t_0
else if (x <= 1.05d-54) then
tmp = ((eps * t_1) * (eps + (x * 5.0d0))) + ((x * x) * (10.0d0 * t_1))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0))))));
double t_1 = eps * (eps * eps);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.05e-54) {
tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))) t_1 = eps * (eps * eps) tmp = 0 if x <= -1.3e-40: tmp = t_0 elif x <= 1.05e-54: tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1)) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(x * Float64(Float64(Float64(eps * eps) * Float64(Float64(eps * 5.0) + Float64(x * 10.0))) + Float64(x * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))))) t_1 = Float64(eps * Float64(eps * eps)) tmp = 0.0 if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.05e-54) tmp = Float64(Float64(Float64(eps * t_1) * Float64(eps + Float64(x * 5.0))) + Float64(Float64(x * x) * Float64(10.0 * t_1))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (x * (((eps * eps) * ((eps * 5.0) + (x * 10.0))) + (x * (x * ((x * 5.0) + (eps * 10.0)))))); t_1 = eps * (eps * eps); tmp = 0.0; if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.05e-54) tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(x * N[(N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e-40], t$95$0, If[LessEqual[x, 1.05e-54], N[(N[(N[(eps * t$95$1), $MachinePrecision] * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(10.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(x \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right) + x \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\right)\\
t_1 := \varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-54}:\\
\;\;\;\;\left(\varepsilon \cdot t\_1\right) \cdot \left(\varepsilon + x \cdot 5\right) + \left(x \cdot x\right) \cdot \left(10 \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.3000000000000001e-40 or 1.05e-54 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
distribute-rgt-inN/A
associate-*r*N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified96.1%
if -1.3000000000000001e-40 < x < 1.05e-54Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
+-commutativeN/A
distribute-lft-inN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
Applied egg-rr98.3%
Final simplification97.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(* (+ x eps) (* 10.0 (* eps (* x x)))))))
(t_1 (* eps (* eps eps))))
(if (<= x -1.3e-40)
t_0
(if (<= x 1.65e-56)
(+ (* (* eps t_1) (+ eps (* x 5.0))) (* (* x x) (* 10.0 t_1)))
t_0))))
double code(double x, double eps) {
double t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x)))));
double t_1 = eps * (eps * eps);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.65e-56) {
tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1));
} 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) :: t_1
real(8) :: tmp
t_0 = eps * ((5.0d0 * (x * (x * (x * x)))) + ((x + eps) * (10.0d0 * (eps * (x * x)))))
t_1 = eps * (eps * eps)
if (x <= (-1.3d-40)) then
tmp = t_0
else if (x <= 1.65d-56) then
tmp = ((eps * t_1) * (eps + (x * 5.0d0))) + ((x * x) * (10.0d0 * t_1))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x)))));
double t_1 = eps * (eps * eps);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.65e-56) {
tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x))))) t_1 = eps * (eps * eps) tmp = 0 if x <= -1.3e-40: tmp = t_0 elif x <= 1.65e-56: tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1)) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(Float64(x + eps) * Float64(10.0 * Float64(eps * Float64(x * x)))))) t_1 = Float64(eps * Float64(eps * eps)) tmp = 0.0 if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.65e-56) tmp = Float64(Float64(Float64(eps * t_1) * Float64(eps + Float64(x * 5.0))) + Float64(Float64(x * x) * Float64(10.0 * t_1))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x))))); t_1 = eps * (eps * eps); tmp = 0.0; if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.65e-56) tmp = ((eps * t_1) * (eps + (x * 5.0))) + ((x * x) * (10.0 * t_1)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x + eps), $MachinePrecision] * N[(10.0 * N[(eps * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e-40], t$95$0, If[LessEqual[x, 1.65e-56], N[(N[(N[(eps * t$95$1), $MachinePrecision] * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(10.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \left(x + \varepsilon\right) \cdot \left(10 \cdot \left(\varepsilon \cdot \left(x \cdot x\right)\right)\right)\right)\\
t_1 := \varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-56}:\\
\;\;\;\;\left(\varepsilon \cdot t\_1\right) \cdot \left(\varepsilon + x \cdot 5\right) + \left(x \cdot x\right) \cdot \left(10 \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.3000000000000001e-40 or 1.64999999999999992e-56 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in eps around 0
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f6495.4%
Simplified95.4%
if -1.3000000000000001e-40 < x < 1.64999999999999992e-56Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
+-commutativeN/A
distribute-lft-inN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
Applied egg-rr98.3%
Final simplification97.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(* (+ x eps) (* 10.0 (* eps (* x x))))))))
(if (<= x -1.7e-40)
t_0
(if (<= x 9.8e-54)
(*
eps
(* (* eps eps) (+ (* (* x x) 10.0) (* x (* eps (+ 5.0 (/ eps x)))))))
t_0))))
double code(double x, double eps) {
double t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x)))));
double tmp;
if (x <= -1.7e-40) {
tmp = t_0;
} else if (x <= 9.8e-54) {
tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x))))));
} 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 = eps * ((5.0d0 * (x * (x * (x * x)))) + ((x + eps) * (10.0d0 * (eps * (x * x)))))
if (x <= (-1.7d-40)) then
tmp = t_0
else if (x <= 9.8d-54) then
tmp = eps * ((eps * eps) * (((x * x) * 10.0d0) + (x * (eps * (5.0d0 + (eps / x))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x)))));
double tmp;
if (x <= -1.7e-40) {
tmp = t_0;
} else if (x <= 9.8e-54) {
tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x))))) tmp = 0 if x <= -1.7e-40: tmp = t_0 elif x <= 9.8e-54: tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x)))))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(Float64(x + eps) * Float64(10.0 * Float64(eps * Float64(x * x)))))) tmp = 0.0 if (x <= -1.7e-40) tmp = t_0; elseif (x <= 9.8e-54) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(Float64(Float64(x * x) * 10.0) + Float64(x * Float64(eps * Float64(5.0 + Float64(eps / x))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * ((5.0 * (x * (x * (x * x)))) + ((x + eps) * (10.0 * (eps * (x * x))))); tmp = 0.0; if (x <= -1.7e-40) tmp = t_0; elseif (x <= 9.8e-54) tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x)))))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x + eps), $MachinePrecision] * N[(10.0 * N[(eps * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e-40], t$95$0, If[LessEqual[x, 9.8e-54], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] + N[(x * N[(eps * N[(5.0 + N[(eps / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \left(x + \varepsilon\right) \cdot \left(10 \cdot \left(\varepsilon \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-54}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\left(x \cdot x\right) \cdot 10 + x \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon}{x}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.69999999999999992e-40 or 9.80000000000000042e-54 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in eps around 0
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f6495.4%
Simplified95.4%
if -1.69999999999999992e-40 < x < 9.80000000000000042e-54Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in x around -inf
distribute-rgt-inN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
associate-*l/N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
Simplified98.3%
Final simplification97.7%
(FPCore (x eps)
:precision binary64
(if (<= x -1.4e-40)
(* (* x (* x x)) (* eps (+ (* x 5.0) (* eps 10.0))))
(if (<= x 2.5e-53)
(*
eps
(* (* eps eps) (+ (* (* x x) 10.0) (* x (* eps (+ 5.0 (/ eps x)))))))
(* (- (* eps 5.0) (/ (* (* eps eps) -10.0) x)) (* (* x x) (* x x))))))
double code(double x, double eps) {
double tmp;
if (x <= -1.4e-40) {
tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0)));
} else if (x <= 2.5e-53) {
tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x))))));
} else {
tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.4d-40)) then
tmp = (x * (x * x)) * (eps * ((x * 5.0d0) + (eps * 10.0d0)))
else if (x <= 2.5d-53) then
tmp = eps * ((eps * eps) * (((x * x) * 10.0d0) + (x * (eps * (5.0d0 + (eps / x))))))
else
tmp = ((eps * 5.0d0) - (((eps * eps) * (-10.0d0)) / x)) * ((x * x) * (x * x))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.4e-40) {
tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0)));
} else if (x <= 2.5e-53) {
tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x))))));
} else {
tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.4e-40: tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0))) elif x <= 2.5e-53: tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x)))))) else: tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.4e-40) tmp = Float64(Float64(x * Float64(x * x)) * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0)))); elseif (x <= 2.5e-53) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(Float64(Float64(x * x) * 10.0) + Float64(x * Float64(eps * Float64(5.0 + Float64(eps / x))))))); else tmp = Float64(Float64(Float64(eps * 5.0) - Float64(Float64(Float64(eps * eps) * -10.0) / x)) * Float64(Float64(x * x) * Float64(x * x))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.4e-40) tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0))); elseif (x <= 2.5e-53) tmp = eps * ((eps * eps) * (((x * x) * 10.0) + (x * (eps * (5.0 + (eps / x)))))); else tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.4e-40], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e-53], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] + N[(x * N[(eps * N[(5.0 + N[(eps / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(eps * 5.0), $MachinePrecision] - N[(N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-40}:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-53}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\left(x \cdot x\right) \cdot 10 + x \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon}{x}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\varepsilon \cdot 5 - \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -1.4e-40Initial program 26.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified90.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
if -1.4e-40 < x < 2.5e-53Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in x around -inf
distribute-rgt-inN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
associate-*l/N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
Simplified98.3%
if 2.5e-53 < x Initial program 32.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
Final simplification97.5%
(FPCore (x eps)
:precision binary64
(if (<= x -1.35e-40)
(* (* x (* x x)) (* eps (+ (* x 5.0) (* eps 10.0))))
(if (<= x 4.1e-50)
(* eps (* (* eps eps) (+ (* eps eps) (* x (+ (* eps 5.0) (* x 10.0))))))
(* (- (* eps 5.0) (/ (* (* eps eps) -10.0) x)) (* (* x x) (* x x))))))
double code(double x, double eps) {
double tmp;
if (x <= -1.35e-40) {
tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0)));
} else if (x <= 4.1e-50) {
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0)))));
} else {
tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-1.35d-40)) then
tmp = (x * (x * x)) * (eps * ((x * 5.0d0) + (eps * 10.0d0)))
else if (x <= 4.1d-50) then
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0d0) + (x * 10.0d0)))))
else
tmp = ((eps * 5.0d0) - (((eps * eps) * (-10.0d0)) / x)) * ((x * x) * (x * x))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -1.35e-40) {
tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0)));
} else if (x <= 4.1e-50) {
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0)))));
} else {
tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -1.35e-40: tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0))) elif x <= 4.1e-50: tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0))))) else: tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -1.35e-40) tmp = Float64(Float64(x * Float64(x * x)) * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0)))); elseif (x <= 4.1e-50) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(Float64(eps * eps) + Float64(x * Float64(Float64(eps * 5.0) + Float64(x * 10.0)))))); else tmp = Float64(Float64(Float64(eps * 5.0) - Float64(Float64(Float64(eps * eps) * -10.0) / x)) * Float64(Float64(x * x) * Float64(x * x))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -1.35e-40) tmp = (x * (x * x)) * (eps * ((x * 5.0) + (eps * 10.0))); elseif (x <= 4.1e-50) tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0))))); else tmp = ((eps * 5.0) - (((eps * eps) * -10.0) / x)) * ((x * x) * (x * x)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -1.35e-40], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e-50], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * eps), $MachinePrecision] + N[(x * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(eps * 5.0), $MachinePrecision] - N[(N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-50}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon + x \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\varepsilon \cdot 5 - \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -1.35e-40Initial program 26.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified90.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
if -1.35e-40 < x < 4.09999999999999985e-50Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
if 4.09999999999999985e-50 < x Initial program 32.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
Final simplification97.5%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (+ (* x 5.0) (* eps 10.0))))
(if (<= x -1.65e-40)
(* t_0 (* eps t_1))
(if (<= x 4.1e-53)
(* eps (* (* eps eps) (+ (* eps eps) (* x (+ (* eps 5.0) (* x 10.0))))))
(* t_1 (* eps t_0))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.65e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 4.1e-53) {
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0)))));
} else {
tmp = t_1 * (eps * 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) :: t_1
real(8) :: tmp
t_0 = x * (x * x)
t_1 = (x * 5.0d0) + (eps * 10.0d0)
if (x <= (-1.65d-40)) then
tmp = t_0 * (eps * t_1)
else if (x <= 4.1d-53) then
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0d0) + (x * 10.0d0)))))
else
tmp = t_1 * (eps * t_0)
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.65e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 4.1e-53) {
tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0)))));
} else {
tmp = t_1 * (eps * t_0);
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) t_1 = (x * 5.0) + (eps * 10.0) tmp = 0 if x <= -1.65e-40: tmp = t_0 * (eps * t_1) elif x <= 4.1e-53: tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0))))) else: tmp = t_1 * (eps * t_0) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(x * 5.0) + Float64(eps * 10.0)) tmp = 0.0 if (x <= -1.65e-40) tmp = Float64(t_0 * Float64(eps * t_1)); elseif (x <= 4.1e-53) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(Float64(eps * eps) + Float64(x * Float64(Float64(eps * 5.0) + Float64(x * 10.0)))))); else tmp = Float64(t_1 * Float64(eps * t_0)); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); t_1 = (x * 5.0) + (eps * 10.0); tmp = 0.0; if (x <= -1.65e-40) tmp = t_0 * (eps * t_1); elseif (x <= 4.1e-53) tmp = eps * ((eps * eps) * ((eps * eps) + (x * ((eps * 5.0) + (x * 10.0))))); else tmp = t_1 * (eps * t_0); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e-40], N[(t$95$0 * N[(eps * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e-53], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(N[(eps * eps), $MachinePrecision] + N[(x * N[(N[(eps * 5.0), $MachinePrecision] + N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(eps * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := x \cdot 5 + \varepsilon \cdot 10\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{-40}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot t\_1\right)\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-53}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon + x \cdot \left(\varepsilon \cdot 5 + x \cdot 10\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\varepsilon \cdot t\_0\right)\\
\end{array}
\end{array}
if x < -1.64999999999999996e-40Initial program 26.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified90.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
if -1.64999999999999996e-40 < x < 4.1000000000000001e-53Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
if 4.1000000000000001e-53 < x Initial program 32.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-commutativeN/A
*-commutativeN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
Taylor expanded in eps around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.5%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (+ (* x 5.0) (* eps 10.0))))
(if (<= x -1.3e-40)
(* t_0 (* eps t_1))
(if (<= x 5.8e-58)
(* (* eps (* eps eps)) (+ (* (* x x) 10.0) (* eps (+ eps (* x 5.0)))))
(* t_1 (* eps t_0))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 5.8e-58) {
tmp = (eps * (eps * eps)) * (((x * x) * 10.0) + (eps * (eps + (x * 5.0))));
} else {
tmp = t_1 * (eps * 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) :: t_1
real(8) :: tmp
t_0 = x * (x * x)
t_1 = (x * 5.0d0) + (eps * 10.0d0)
if (x <= (-1.3d-40)) then
tmp = t_0 * (eps * t_1)
else if (x <= 5.8d-58) then
tmp = (eps * (eps * eps)) * (((x * x) * 10.0d0) + (eps * (eps + (x * 5.0d0))))
else
tmp = t_1 * (eps * t_0)
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.3e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 5.8e-58) {
tmp = (eps * (eps * eps)) * (((x * x) * 10.0) + (eps * (eps + (x * 5.0))));
} else {
tmp = t_1 * (eps * t_0);
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) t_1 = (x * 5.0) + (eps * 10.0) tmp = 0 if x <= -1.3e-40: tmp = t_0 * (eps * t_1) elif x <= 5.8e-58: tmp = (eps * (eps * eps)) * (((x * x) * 10.0) + (eps * (eps + (x * 5.0)))) else: tmp = t_1 * (eps * t_0) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(x * 5.0) + Float64(eps * 10.0)) tmp = 0.0 if (x <= -1.3e-40) tmp = Float64(t_0 * Float64(eps * t_1)); elseif (x <= 5.8e-58) tmp = Float64(Float64(eps * Float64(eps * eps)) * Float64(Float64(Float64(x * x) * 10.0) + Float64(eps * Float64(eps + Float64(x * 5.0))))); else tmp = Float64(t_1 * Float64(eps * t_0)); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); t_1 = (x * 5.0) + (eps * 10.0); tmp = 0.0; if (x <= -1.3e-40) tmp = t_0 * (eps * t_1); elseif (x <= 5.8e-58) tmp = (eps * (eps * eps)) * (((x * x) * 10.0) + (eps * (eps + (x * 5.0)))); else tmp = t_1 * (eps * t_0); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e-40], N[(t$95$0 * N[(eps * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-58], N[(N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] + N[(eps * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(eps * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := x \cdot 5 + \varepsilon \cdot 10\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot t\_1\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-58}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \left(\left(x \cdot x\right) \cdot 10 + \varepsilon \cdot \left(\varepsilon + x \cdot 5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\varepsilon \cdot t\_0\right)\\
\end{array}
\end{array}
if x < -1.3000000000000001e-40Initial program 26.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified90.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
if -1.3000000000000001e-40 < x < 5.7999999999999998e-58Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 5.7999999999999998e-58 < x Initial program 32.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-commutativeN/A
*-commutativeN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
Taylor expanded in eps around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.5%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (+ (* x 5.0) (* eps 10.0))))
(if (<= x -1.35e-40)
(* t_0 (* eps t_1))
(if (<= x 4.8e-57)
(* eps (* (* eps eps) (* eps (+ eps (* x 5.0)))))
(* t_1 (* eps t_0))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.35e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 4.8e-57) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} else {
tmp = t_1 * (eps * 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) :: t_1
real(8) :: tmp
t_0 = x * (x * x)
t_1 = (x * 5.0d0) + (eps * 10.0d0)
if (x <= (-1.35d-40)) then
tmp = t_0 * (eps * t_1)
else if (x <= 4.8d-57) then
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0d0))))
else
tmp = t_1 * (eps * t_0)
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (x * 5.0) + (eps * 10.0);
double tmp;
if (x <= -1.35e-40) {
tmp = t_0 * (eps * t_1);
} else if (x <= 4.8e-57) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} else {
tmp = t_1 * (eps * t_0);
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) t_1 = (x * 5.0) + (eps * 10.0) tmp = 0 if x <= -1.35e-40: tmp = t_0 * (eps * t_1) elif x <= 4.8e-57: tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))) else: tmp = t_1 * (eps * t_0) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(x * 5.0) + Float64(eps * 10.0)) tmp = 0.0 if (x <= -1.35e-40) tmp = Float64(t_0 * Float64(eps * t_1)); elseif (x <= 4.8e-57) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(eps * Float64(eps + Float64(x * 5.0))))); else tmp = Float64(t_1 * Float64(eps * t_0)); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); t_1 = (x * 5.0) + (eps * 10.0); tmp = 0.0; if (x <= -1.35e-40) tmp = t_0 * (eps * t_1); elseif (x <= 4.8e-57) tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))); else tmp = t_1 * (eps * t_0); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-40], N[(t$95$0 * N[(eps * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e-57], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(eps * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(eps * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := x \cdot 5 + \varepsilon \cdot 10\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot t\_1\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-57}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \left(\varepsilon + x \cdot 5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\varepsilon \cdot t\_0\right)\\
\end{array}
\end{array}
if x < -1.35e-40Initial program 26.8%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified90.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
if -1.35e-40 < x < 4.80000000000000012e-57Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.1%
Simplified98.1%
if 4.80000000000000012e-57 < x Initial program 32.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-commutativeN/A
*-commutativeN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
Taylor expanded in eps around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.4%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (+ (* x 5.0) (* eps 10.0)) (* eps (* x (* x x))))))
(if (<= x -3.7e-40)
t_0
(if (<= x 3.4e-55)
(* eps (* (* eps eps) (* eps (+ eps (* x 5.0)))))
t_0))))
double code(double x, double eps) {
double t_0 = ((x * 5.0) + (eps * 10.0)) * (eps * (x * (x * x)));
double tmp;
if (x <= -3.7e-40) {
tmp = t_0;
} else if (x <= 3.4e-55) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} 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 * 5.0d0) + (eps * 10.0d0)) * (eps * (x * (x * x)))
if (x <= (-3.7d-40)) then
tmp = t_0
else if (x <= 3.4d-55) then
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = ((x * 5.0) + (eps * 10.0)) * (eps * (x * (x * x)));
double tmp;
if (x <= -3.7e-40) {
tmp = t_0;
} else if (x <= 3.4e-55) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = ((x * 5.0) + (eps * 10.0)) * (eps * (x * (x * x))) tmp = 0 if x <= -3.7e-40: tmp = t_0 elif x <= 3.4e-55: tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(Float64(Float64(x * 5.0) + Float64(eps * 10.0)) * Float64(eps * Float64(x * Float64(x * x)))) tmp = 0.0 if (x <= -3.7e-40) tmp = t_0; elseif (x <= 3.4e-55) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(eps * Float64(eps + Float64(x * 5.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = ((x * 5.0) + (eps * 10.0)) * (eps * (x * (x * x))); tmp = 0.0; if (x <= -3.7e-40) tmp = t_0; elseif (x <= 3.4e-55) tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.7e-40], t$95$0, If[LessEqual[x, 3.4e-55], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(eps * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot 5 + \varepsilon \cdot 10\right) \cdot \left(\varepsilon \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-55}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \left(\varepsilon + x \cdot 5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -3.69999999999999998e-40 or 3.39999999999999973e-55 < x Initial program 29.9%
Taylor expanded in x around -inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified94.3%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-commutativeN/A
*-commutativeN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr56.4%
Taylor expanded in eps around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-plusN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6494.0%
Simplified94.0%
if -3.69999999999999998e-40 < x < 3.39999999999999973e-55Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.4%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* 5.0 (* (* x x) (* x x))))))
(if (<= x -1.35e-40)
t_0
(if (<= x 4.2e-56)
(* eps (* (* eps eps) (* eps (+ eps (* x 5.0)))))
t_0))))
double code(double x, double eps) {
double t_0 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.35e-40) {
tmp = t_0;
} else if (x <= 4.2e-56) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} 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 = eps * (5.0d0 * ((x * x) * (x * x)))
if (x <= (-1.35d-40)) then
tmp = t_0
else if (x <= 4.2d-56) then
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.35e-40) {
tmp = t_0;
} else if (x <= 4.2e-56) {
tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (5.0 * ((x * x) * (x * x))) tmp = 0 if x <= -1.35e-40: tmp = t_0 elif x <= 4.2e-56: tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(5.0 * Float64(Float64(x * x) * Float64(x * x)))) tmp = 0.0 if (x <= -1.35e-40) tmp = t_0; elseif (x <= 4.2e-56) tmp = Float64(eps * Float64(Float64(eps * eps) * Float64(eps * Float64(eps + Float64(x * 5.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (5.0 * ((x * x) * (x * x))); tmp = 0.0; if (x <= -1.35e-40) tmp = t_0; elseif (x <= 4.2e-56) tmp = eps * ((eps * eps) * (eps * (eps + (x * 5.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(5.0 * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-40], t$95$0, If[LessEqual[x, 4.2e-56], N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(eps * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-56}:\\
\;\;\;\;\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \left(\varepsilon + x \cdot 5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.35e-40 or 4.20000000000000012e-56 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in eps around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
if -1.35e-40 < x < 4.20000000000000012e-56Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.0%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* 5.0 (* (* x x) (* x x))))))
(if (<= x -1.3e-40)
t_0
(if (<= x 1.32e-52)
(* (* eps (* eps eps)) (* eps (+ eps (* x 5.0))))
t_0))))
double code(double x, double eps) {
double t_0 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.32e-52) {
tmp = (eps * (eps * eps)) * (eps * (eps + (x * 5.0)));
} 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 = eps * (5.0d0 * ((x * x) * (x * x)))
if (x <= (-1.3d-40)) then
tmp = t_0
else if (x <= 1.32d-52) then
tmp = (eps * (eps * eps)) * (eps * (eps + (x * 5.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.3e-40) {
tmp = t_0;
} else if (x <= 1.32e-52) {
tmp = (eps * (eps * eps)) * (eps * (eps + (x * 5.0)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (5.0 * ((x * x) * (x * x))) tmp = 0 if x <= -1.3e-40: tmp = t_0 elif x <= 1.32e-52: tmp = (eps * (eps * eps)) * (eps * (eps + (x * 5.0))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(5.0 * Float64(Float64(x * x) * Float64(x * x)))) tmp = 0.0 if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.32e-52) tmp = Float64(Float64(eps * Float64(eps * eps)) * Float64(eps * Float64(eps + Float64(x * 5.0)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (5.0 * ((x * x) * (x * x))); tmp = 0.0; if (x <= -1.3e-40) tmp = t_0; elseif (x <= 1.32e-52) tmp = (eps * (eps * eps)) * (eps * (eps + (x * 5.0))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(5.0 * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e-40], t$95$0, If[LessEqual[x, 1.32e-52], N[(N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-52}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \left(\varepsilon \cdot \left(\varepsilon + x \cdot 5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.3000000000000001e-40 or 1.32000000000000002e-52 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in eps around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
if -1.3000000000000001e-40 < x < 1.32000000000000002e-52Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
unpow2N/A
distribute-rgt-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.1%
Simplified98.1%
Final simplification97.0%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* 5.0 (* (* x x) (* x x))))))
(if (<= x -1.5e-40)
t_0
(if (<= x 1.96e-56) (* eps (* eps (* eps (* eps eps)))) t_0))))
double code(double x, double eps) {
double t_0 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.5e-40) {
tmp = t_0;
} else if (x <= 1.96e-56) {
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 = eps * (5.0d0 * ((x * x) * (x * x)))
if (x <= (-1.5d-40)) then
tmp = t_0
else if (x <= 1.96d-56) 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 = eps * (5.0 * ((x * x) * (x * x)));
double tmp;
if (x <= -1.5e-40) {
tmp = t_0;
} else if (x <= 1.96e-56) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (5.0 * ((x * x) * (x * x))) tmp = 0 if x <= -1.5e-40: tmp = t_0 elif x <= 1.96e-56: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(5.0 * Float64(Float64(x * x) * Float64(x * x)))) tmp = 0.0 if (x <= -1.5e-40) tmp = t_0; elseif (x <= 1.96e-56) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = eps * (5.0 * ((x * x) * (x * x))); tmp = 0.0; if (x <= -1.5e-40) tmp = t_0; elseif (x <= 1.96e-56) tmp = eps * (eps * (eps * (eps * eps))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(eps * N[(5.0 * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e-40], t$95$0, If[LessEqual[x, 1.96e-56], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \varepsilon \cdot \left(5 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{-40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.96 \cdot 10^{-56}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.5000000000000001e-40 or 1.95999999999999995e-56 < x Initial program 29.9%
Taylor expanded in eps around 0
Simplified96.3%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr96.0%
Taylor expanded in eps around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
if -1.5000000000000001e-40 < x < 1.95999999999999995e-56Initial program 98.5%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified89.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6498.2%
Simplified98.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr98.2%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
Final simplification96.7%
(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(eps * Float64(eps * Float64(eps * Float64(eps * eps)))) end
function tmp = code(x, eps) tmp = eps * (eps * (eps * (eps * eps))); end
code[x_, eps_] := N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)
\end{array}
Initial program 86.2%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified74.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6484.8%
Simplified84.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr84.8%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.3%
Simplified84.3%
Final simplification84.3%
(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(eps * Float64(Float64(eps * eps) * Float64(eps * eps))) end
function tmp = code(x, eps) tmp = eps * ((eps * eps) * (eps * eps)); end
code[x_, eps_] := N[(eps * N[(N[(eps * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\varepsilon \cdot \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right)
\end{array}
Initial program 86.2%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified74.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6484.8%
Simplified84.8%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr84.8%
Taylor expanded in eps around inf
unpow2N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification84.2%
(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(eps * eps) * Float64(eps * Float64(eps * eps))) end
function tmp = code(x, eps) tmp = (eps * eps) * (eps * (eps * eps)); end
code[x_, eps_] := N[(N[(eps * eps), $MachinePrecision] * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)
\end{array}
Initial program 86.2%
Taylor expanded in eps around -inf
associate-*r*N/A
*-commutativeN/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
distribute-lft1-inN/A
associate-*l*N/A
Simplified74.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-rgt1-inN/A
+-lowering-+.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
*-lowering-*.f6484.8%
Simplified84.8%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification84.2%
herbie shell --seed 2024138
(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)))