
(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 12 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-323)
t_0
(if (<= t_0 0.0) (* eps (* 5.0 (pow x 4.0))) 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-323) {
tmp = t_0;
} else if (t_0 <= 0.0) {
tmp = eps * (5.0 * pow(x, 4.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 + eps) ** 5.0d0) - (x ** 5.0d0)
if (t_0 <= (-1d-323)) then
tmp = t_0
else if (t_0 <= 0.0d0) then
tmp = eps * (5.0d0 * (x ** 4.0d0))
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-323) {
tmp = t_0;
} else if (t_0 <= 0.0) {
tmp = eps * (5.0 * Math.pow(x, 4.0));
} 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-323: tmp = t_0 elif t_0 <= 0.0: tmp = eps * (5.0 * math.pow(x, 4.0)) 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-323) tmp = t_0; elseif (t_0 <= 0.0) tmp = Float64(eps * Float64(5.0 * (x ^ 4.0))); 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-323) tmp = t_0; elseif (t_0 <= 0.0) tmp = eps * (5.0 * (x ^ 4.0)); 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-323], t$95$0, If[LessEqual[t$95$0, 0.0], N[(eps * N[(5.0 * N[Power[x, 4.0], $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^{-323}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4}\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))) < -9.88131e-324 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) Initial program 98.0%
if -9.88131e-324 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0Initial program 86.9%
Taylor expanded in x around inf
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6499.9%
Simplified99.9%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= x -5.9e-39)
(*
eps
(+
(* 5.0 (pow x 4.0))
(*
eps
(+ (* t_0 10.0) (* eps (+ (* (* x x) 10.0) (* 5.0 (* x eps))))))))
(if (<= x 1.32e-52)
(* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps))))
(*
eps
(+
(* 5.0 (* x t_0))
(*
eps
(+ (* (+ x eps) (* x (* x 10.0))) (* eps (* eps (* x 5.0)))))))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * ((5.0 * pow(x, 4.0)) + (eps * ((t_0 * 10.0) + (eps * (((x * x) * 10.0) + (5.0 * (x * eps)))))));
} else if (x <= 1.32e-52) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * ((5.0 * (x * t_0)) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = x * (x * x)
if (x <= (-5.9d-39)) then
tmp = eps * ((5.0d0 * (x ** 4.0d0)) + (eps * ((t_0 * 10.0d0) + (eps * (((x * x) * 10.0d0) + (5.0d0 * (x * eps)))))))
else if (x <= 1.32d-52) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = eps * ((5.0d0 * (x * t_0)) + (eps * (((x + eps) * (x * (x * 10.0d0))) + (eps * (eps * (x * 5.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * ((5.0 * Math.pow(x, 4.0)) + (eps * ((t_0 * 10.0) + (eps * (((x * x) * 10.0) + (5.0 * (x * eps)))))));
} else if (x <= 1.32e-52) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * ((5.0 * (x * t_0)) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) tmp = 0 if x <= -5.9e-39: tmp = eps * ((5.0 * math.pow(x, 4.0)) + (eps * ((t_0 * 10.0) + (eps * (((x * x) * 10.0) + (5.0 * (x * eps))))))) elif x <= 1.32e-52: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = eps * ((5.0 * (x * t_0)) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(eps * Float64(Float64(5.0 * (x ^ 4.0)) + Float64(eps * Float64(Float64(t_0 * 10.0) + Float64(eps * Float64(Float64(Float64(x * x) * 10.0) + Float64(5.0 * Float64(x * eps)))))))); elseif (x <= 1.32e-52) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = Float64(eps * Float64(Float64(5.0 * Float64(x * t_0)) + Float64(eps * Float64(Float64(Float64(x + eps) * Float64(x * Float64(x * 10.0))) + Float64(eps * Float64(eps * Float64(x * 5.0))))))); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); tmp = 0.0; if (x <= -5.9e-39) tmp = eps * ((5.0 * (x ^ 4.0)) + (eps * ((t_0 * 10.0) + (eps * (((x * x) * 10.0) + (5.0 * (x * eps))))))); elseif (x <= 1.32e-52) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = eps * ((5.0 * (x * t_0)) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.9e-39], N[(eps * N[(N[(5.0 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(t$95$0 * 10.0), $MachinePrecision] + N[(eps * N[(N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] + N[(5.0 * N[(x * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.32e-52], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(N[(5.0 * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x + eps), $MachinePrecision] * N[(x * N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4} + \varepsilon \cdot \left(t\_0 \cdot 10 + \varepsilon \cdot \left(\left(x \cdot x\right) \cdot 10 + 5 \cdot \left(x \cdot \varepsilon\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-52}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot \left(x \cdot t\_0\right) + \varepsilon \cdot \left(\left(x + \varepsilon\right) \cdot \left(x \cdot \left(x \cdot 10\right)\right) + \varepsilon \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
Taylor expanded in eps around 0
Simplified96.5%
if -5.8999999999999998e-39 < x < 1.32000000000000002e-52Initial program 99.9%
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-/.f6499.5%
Simplified99.5%
if 1.32000000000000002e-52 < x Initial program 39.9%
Taylor expanded in eps around 0
Simplified95.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr95.0%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(if (<= x -5.9e-39)
(* (* x x) (* x (* eps (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 1.35e-52)
(* (pow eps 5.0) (+ 1.0 (* 5.0 (/ x eps))))
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(*
eps
(+ (* (+ x eps) (* x (* x 10.0))) (* eps (* eps (* x 5.0))))))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 1.35e-52) {
tmp = pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.9d-39)) then
tmp = (x * x) * (x * (eps * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 1.35d-52) then
tmp = (eps ** 5.0d0) * (1.0d0 + (5.0d0 * (x / eps)))
else
tmp = eps * ((5.0d0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0d0))) + (eps * (eps * (x * 5.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 1.35e-52) {
tmp = Math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps)));
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.9e-39: tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))) elif x <= 1.35e-52: tmp = math.pow(eps, 5.0) * (1.0 + (5.0 * (x / eps))) else: tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(Float64(x * x) * Float64(x * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 1.35e-52) tmp = Float64((eps ^ 5.0) * Float64(1.0 + Float64(5.0 * Float64(x / eps)))); else tmp = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(eps * Float64(Float64(Float64(x + eps) * Float64(x * Float64(x * 10.0))) + Float64(eps * Float64(eps * Float64(x * 5.0))))))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.9e-39) tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 1.35e-52) tmp = (eps ^ 5.0) * (1.0 + (5.0 * (x / eps))); else tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.9e-39], N[(N[(x * x), $MachinePrecision] * N[(x * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-52], N[(N[Power[eps, 5.0], $MachinePrecision] * N[(1.0 + N[(5.0 * N[(x / eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x + eps), $MachinePrecision] * N[(x * N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-52}:\\
\;\;\;\;{\varepsilon}^{5} \cdot \left(1 + 5 \cdot \frac{x}{\varepsilon}\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \varepsilon \cdot \left(\left(x + \varepsilon\right) \cdot \left(x \cdot \left(x \cdot 10\right)\right) + \varepsilon \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
if -5.8999999999999998e-39 < x < 1.35000000000000005e-52Initial program 99.9%
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-/.f6499.5%
Simplified99.5%
if 1.35000000000000005e-52 < x Initial program 39.9%
Taylor expanded in eps around 0
Simplified95.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr95.0%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(if (<= x -6.6e-39)
(* (* x x) (* x (* eps (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 3e-52)
(pow eps 5.0)
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(*
eps
(+ (* (+ x eps) (* x (* x 10.0))) (* eps (* eps (* x 5.0))))))))))
double code(double x, double eps) {
double tmp;
if (x <= -6.6e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 3e-52) {
tmp = pow(eps, 5.0);
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-6.6d-39)) then
tmp = (x * x) * (x * (eps * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 3d-52) then
tmp = eps ** 5.0d0
else
tmp = eps * ((5.0d0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0d0))) + (eps * (eps * (x * 5.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -6.6e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 3e-52) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -6.6e-39: tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))) elif x <= 3e-52: tmp = math.pow(eps, 5.0) else: tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -6.6e-39) tmp = Float64(Float64(x * x) * Float64(x * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 3e-52) tmp = eps ^ 5.0; else tmp = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(eps * Float64(Float64(Float64(x + eps) * Float64(x * Float64(x * 10.0))) + Float64(eps * Float64(eps * Float64(x * 5.0))))))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -6.6e-39) tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 3e-52) tmp = eps ^ 5.0; else tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -6.6e-39], N[(N[(x * x), $MachinePrecision] * N[(x * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-52], N[Power[eps, 5.0], $MachinePrecision], N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x + eps), $MachinePrecision] * N[(x * N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-52}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \varepsilon \cdot \left(\left(x + \varepsilon\right) \cdot \left(x \cdot \left(x \cdot 10\right)\right) + \varepsilon \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.5999999999999997e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
if -6.5999999999999997e-39 < x < 3e-52Initial program 99.9%
Taylor expanded in x around 0
pow-lowering-pow.f6499.5%
Simplified99.5%
if 3e-52 < x Initial program 39.9%
Taylor expanded in eps around 0
Simplified95.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr95.0%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(if (<= x -5.9e-39)
(* (* x x) (* x (* eps (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 2.5e-52)
(* (* eps (* eps (* eps eps))) (* x (+ 5.0 (/ eps x))))
(*
eps
(+
(* 5.0 (* x (* x (* x x))))
(*
eps
(+ (* (+ x eps) (* x (* x 10.0))) (* eps (* eps (* x 5.0))))))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.5e-52) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.9d-39)) then
tmp = (x * x) * (x * (eps * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 2.5d-52) then
tmp = (eps * (eps * (eps * eps))) * (x * (5.0d0 + (eps / x)))
else
tmp = eps * ((5.0d0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0d0))) + (eps * (eps * (x * 5.0d0))))))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.5e-52) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0))))));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.9e-39: tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))) elif x <= 2.5e-52: tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))) else: tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(Float64(x * x) * Float64(x * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 2.5e-52) tmp = Float64(Float64(eps * Float64(eps * Float64(eps * eps))) * Float64(x * Float64(5.0 + Float64(eps / x)))); else tmp = Float64(eps * Float64(Float64(5.0 * Float64(x * Float64(x * Float64(x * x)))) + Float64(eps * Float64(Float64(Float64(x + eps) * Float64(x * Float64(x * 10.0))) + Float64(eps * Float64(eps * Float64(x * 5.0))))))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.9e-39) tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 2.5e-52) tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))); else tmp = eps * ((5.0 * (x * (x * (x * x)))) + (eps * (((x + eps) * (x * (x * 10.0))) + (eps * (eps * (x * 5.0)))))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.9e-39], N[(N[(x * x), $MachinePrecision] * N[(x * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e-52], N[(N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(5.0 + N[(eps / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(eps * N[(N[(5.0 * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(N[(N[(x + eps), $MachinePrecision] * N[(x * N[(x * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(eps * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-52}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \left(x \cdot \left(5 + \frac{\varepsilon}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) + \varepsilon \cdot \left(\left(x + \varepsilon\right) \cdot \left(x \cdot \left(x \cdot 10\right)\right) + \varepsilon \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
if -5.8999999999999998e-39 < x < 2.5e-52Initial program 99.9%
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-/.f6499.5%
Simplified99.5%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.4%
Applied egg-rr99.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6499.4%
Simplified99.4%
if 2.5e-52 < x Initial program 39.9%
Taylor expanded in eps around 0
Simplified95.0%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr95.0%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(if (<= x -5.9e-39)
(* (* x x) (* x (* eps (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 2.7e-42)
(* (* eps (* eps (* eps eps))) (* x (+ 5.0 (/ eps x))))
(* (* x (* x x)) (* eps (* x 5.0))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.7e-42) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.9d-39)) then
tmp = (x * x) * (x * (eps * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 2.7d-42) then
tmp = (eps * (eps * (eps * eps))) * (x * (5.0d0 + (eps / x)))
else
tmp = (x * (x * x)) * (eps * (x * 5.0d0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.7e-42) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.9e-39: tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))) elif x <= 2.7e-42: tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))) else: tmp = (x * (x * x)) * (eps * (x * 5.0)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(Float64(x * x) * Float64(x * Float64(eps * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 2.7e-42) tmp = Float64(Float64(eps * Float64(eps * Float64(eps * eps))) * Float64(x * Float64(5.0 + Float64(eps / x)))); else tmp = Float64(Float64(x * Float64(x * x)) * Float64(eps * Float64(x * 5.0))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.9e-39) tmp = (x * x) * (x * (eps * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 2.7e-42) tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))); else tmp = (x * (x * x)) * (eps * (x * 5.0)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.9e-39], N[(N[(x * x), $MachinePrecision] * N[(x * N[(eps * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-42], N[(N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(5.0 + N[(eps / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot \left(\varepsilon \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-42}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \left(x \cdot \left(5 + \frac{\varepsilon}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
if -5.8999999999999998e-39 < x < 2.69999999999999999e-42Initial program 99.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-/.f6499.1%
Simplified99.1%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.0%
Applied egg-rr99.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6499.0%
Simplified99.0%
if 2.69999999999999999e-42 < x Initial program 30.1%
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.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in eps around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(if (<= x -6.2e-39)
(* (* x x) (* eps (* x (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 2.9e-42)
(* (* eps (* eps (* eps eps))) (* x (+ 5.0 (/ eps x))))
(* (* x (* x x)) (* eps (* x 5.0))))))
double code(double x, double eps) {
double tmp;
if (x <= -6.2e-39) {
tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.9e-42) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-6.2d-39)) then
tmp = (x * x) * (eps * (x * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 2.9d-42) then
tmp = (eps * (eps * (eps * eps))) * (x * (5.0d0 + (eps / x)))
else
tmp = (x * (x * x)) * (eps * (x * 5.0d0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -6.2e-39) {
tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 2.9e-42) {
tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x)));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -6.2e-39: tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0)))) elif x <= 2.9e-42: tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))) else: tmp = (x * (x * x)) * (eps * (x * 5.0)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -6.2e-39) tmp = Float64(Float64(x * x) * Float64(eps * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 2.9e-42) tmp = Float64(Float64(eps * Float64(eps * Float64(eps * eps))) * Float64(x * Float64(5.0 + Float64(eps / x)))); else tmp = Float64(Float64(x * Float64(x * x)) * Float64(eps * Float64(x * 5.0))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -6.2e-39) tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 2.9e-42) tmp = (eps * (eps * (eps * eps))) * (x * (5.0 + (eps / x))); else tmp = (x * (x * x)) * (eps * (x * 5.0)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -6.2e-39], N[(N[(x * x), $MachinePrecision] * N[(eps * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-42], N[(N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(5.0 + N[(eps / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\varepsilon \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-42}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \left(x \cdot \left(5 + \frac{\varepsilon}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\\
\end{array}
\end{array}
if x < -6.1999999999999994e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.2%
Applied egg-rr96.2%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.3%
Applied egg-rr96.3%
if -6.1999999999999994e-39 < x < 2.9000000000000003e-42Initial program 99.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-/.f6499.1%
Simplified99.1%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.0%
Applied egg-rr99.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6499.0%
Simplified99.0%
if 2.9000000000000003e-42 < x Initial program 30.1%
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.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in eps around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(if (<= x -5.9e-39)
(* (* x x) (* eps (* x (+ (* x 5.0) (* eps 10.0)))))
(if (<= x 1.5e-38)
(* (* eps (* eps (* eps eps))) (+ eps (* x 5.0)))
(* (* x (* x x)) (* eps (* x 5.0))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 1.5e-38) {
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (x <= (-5.9d-39)) then
tmp = (x * x) * (eps * (x * ((x * 5.0d0) + (eps * 10.0d0))))
else if (x <= 1.5d-38) then
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0d0))
else
tmp = (x * (x * x)) * (eps * (x * 5.0d0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.9e-39) {
tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0))));
} else if (x <= 1.5e-38) {
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0));
} else {
tmp = (x * (x * x)) * (eps * (x * 5.0));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.9e-39: tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0)))) elif x <= 1.5e-38: tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0)) else: tmp = (x * (x * x)) * (eps * (x * 5.0)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(Float64(x * x) * Float64(eps * Float64(x * Float64(Float64(x * 5.0) + Float64(eps * 10.0))))); elseif (x <= 1.5e-38) tmp = Float64(Float64(eps * Float64(eps * Float64(eps * eps))) * Float64(eps + Float64(x * 5.0))); else tmp = Float64(Float64(x * Float64(x * x)) * Float64(eps * Float64(x * 5.0))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.9e-39) tmp = (x * x) * (eps * (x * ((x * 5.0) + (eps * 10.0)))); elseif (x <= 1.5e-38) tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0)); else tmp = (x * (x * x)) * (eps * (x * 5.0)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.9e-39], N[(N[(x * x), $MachinePrecision] * N[(eps * N[(x * N[(N[(x * 5.0), $MachinePrecision] + N[(eps * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e-38], N[(N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\varepsilon \cdot \left(x \cdot \left(x \cdot 5 + \varepsilon \cdot 10\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-38}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \left(\varepsilon + x \cdot 5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
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
Simplified96.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6496.2%
Simplified96.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.2%
Applied egg-rr96.2%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.3%
Applied egg-rr96.3%
if -5.8999999999999998e-39 < x < 1.49999999999999994e-38Initial program 99.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-/.f6499.1%
Simplified99.1%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.0%
Applied egg-rr99.0%
if 1.49999999999999994e-38 < x Initial program 30.1%
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.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in eps around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= x -5.9e-39)
(* eps (* x (* 5.0 t_0)))
(if (<= x 8.2e-42)
(* (* eps (* eps (* eps eps))) (+ eps (* x 5.0)))
(* t_0 (* eps (* x 5.0)))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * (x * (5.0 * t_0));
} else if (x <= 8.2e-42) {
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0));
} else {
tmp = t_0 * (eps * (x * 5.0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = x * (x * x)
if (x <= (-5.9d-39)) then
tmp = eps * (x * (5.0d0 * t_0))
else if (x <= 8.2d-42) then
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0d0))
else
tmp = t_0 * (eps * (x * 5.0d0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * (x * (5.0 * t_0));
} else if (x <= 8.2e-42) {
tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0));
} else {
tmp = t_0 * (eps * (x * 5.0));
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) tmp = 0 if x <= -5.9e-39: tmp = eps * (x * (5.0 * t_0)) elif x <= 8.2e-42: tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0)) else: tmp = t_0 * (eps * (x * 5.0)) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(eps * Float64(x * Float64(5.0 * t_0))); elseif (x <= 8.2e-42) tmp = Float64(Float64(eps * Float64(eps * Float64(eps * eps))) * Float64(eps + Float64(x * 5.0))); else tmp = Float64(t_0 * Float64(eps * Float64(x * 5.0))); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); tmp = 0.0; if (x <= -5.9e-39) tmp = eps * (x * (5.0 * t_0)); elseif (x <= 8.2e-42) tmp = (eps * (eps * (eps * eps))) * (eps + (x * 5.0)); else tmp = t_0 * (eps * (x * 5.0)); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.9e-39], N[(eps * N[(x * N[(5.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e-42], N[(N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(eps + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(5 \cdot t\_0\right)\right)\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-42}:\\
\;\;\;\;\left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \left(\varepsilon + x \cdot 5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
Taylor expanded in eps around 0
Simplified96.5%
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.3%
Applied egg-rr96.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
Simplified96.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.1%
Simplified96.1%
if -5.8999999999999998e-39 < x < 8.2000000000000003e-42Initial program 99.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-/.f6499.1%
Simplified99.1%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.0%
Applied egg-rr99.0%
if 8.2000000000000003e-42 < x Initial program 30.1%
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.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in eps around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= x -5.9e-39)
(* eps (* x (* 5.0 t_0)))
(if (<= x 5.1e-51)
(* eps (* eps (* eps (* eps eps))))
(* t_0 (* eps (* x 5.0)))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * (x * (5.0 * t_0));
} else if (x <= 5.1e-51) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * (x * 5.0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = x * (x * x)
if (x <= (-5.9d-39)) then
tmp = eps * (x * (5.0d0 * t_0))
else if (x <= 5.1d-51) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = t_0 * (eps * (x * 5.0d0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double tmp;
if (x <= -5.9e-39) {
tmp = eps * (x * (5.0 * t_0));
} else if (x <= 5.1e-51) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * (x * 5.0));
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) tmp = 0 if x <= -5.9e-39: tmp = eps * (x * (5.0 * t_0)) elif x <= 5.1e-51: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 * (eps * (x * 5.0)) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= -5.9e-39) tmp = Float64(eps * Float64(x * Float64(5.0 * t_0))); elseif (x <= 5.1e-51) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = Float64(t_0 * Float64(eps * Float64(x * 5.0))); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); tmp = 0.0; if (x <= -5.9e-39) tmp = eps * (x * (5.0 * t_0)); elseif (x <= 5.1e-51) tmp = eps * (eps * (eps * (eps * eps))); else tmp = t_0 * (eps * (x * 5.0)); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.9e-39], N[(eps * N[(x * N[(5.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-51], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(5 \cdot t\_0\right)\right)\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-51}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot \left(x \cdot 5\right)\right)\\
\end{array}
\end{array}
if x < -5.8999999999999998e-39Initial program 37.0%
Taylor expanded in eps around 0
Simplified96.5%
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.3%
Applied egg-rr96.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
Simplified96.3%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.1%
Simplified96.1%
if -5.8999999999999998e-39 < x < 5.0999999999999997e-51Initial program 99.9%
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-/.f6499.5%
Simplified99.5%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.4%
Applied egg-rr99.4%
Taylor expanded in eps around inf
Simplified99.4%
if 5.0999999999999997e-51 < x Initial program 39.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.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/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
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6495.0%
Simplified95.0%
Taylor expanded in eps around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.9%
Simplified94.9%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* x (* 5.0 (* x (* x x)))))))
(if (<= x -5.9e-39)
t_0
(if (<= x 3.1e-52) (* eps (* eps (* eps (* eps eps)))) t_0))))
double code(double x, double eps) {
double t_0 = eps * (x * (5.0 * (x * (x * x))));
double tmp;
if (x <= -5.9e-39) {
tmp = t_0;
} else if (x <= 3.1e-52) {
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 * (x * (5.0d0 * (x * (x * x))))
if (x <= (-5.9d-39)) then
tmp = t_0
else if (x <= 3.1d-52) 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 * (x * (5.0 * (x * (x * x))));
double tmp;
if (x <= -5.9e-39) {
tmp = t_0;
} else if (x <= 3.1e-52) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (x * (5.0 * (x * (x * x)))) tmp = 0 if x <= -5.9e-39: tmp = t_0 elif x <= 3.1e-52: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(x * Float64(5.0 * Float64(x * Float64(x * x))))) tmp = 0.0 if (x <= -5.9e-39) tmp = t_0; elseif (x <= 3.1e-52) 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 * (x * (5.0 * (x * (x * x)))); tmp = 0.0; if (x <= -5.9e-39) tmp = t_0; elseif (x <= 3.1e-52) 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[(x * N[(5.0 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.9e-39], t$95$0, If[LessEqual[x, 3.1e-52], 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(x \cdot \left(5 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{if}\;x \leq -5.9 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-52}:\\
\;\;\;\;\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 < -5.8999999999999998e-39 or 3.0999999999999999e-52 < x Initial program 38.2%
Taylor expanded in eps around 0
Simplified95.9%
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.8%
Applied egg-rr95.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
distribute-rgt-inN/A
associate-*r*N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified95.6%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.5%
Simplified95.5%
if -5.8999999999999998e-39 < x < 3.0999999999999999e-52Initial program 99.9%
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-/.f6499.5%
Simplified99.5%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.4%
Applied egg-rr99.4%
Taylor expanded in eps around inf
Simplified99.4%
Final simplification98.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 88.6%
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-/.f6487.9%
Simplified87.9%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.8%
Simplified87.8%
metadata-evalN/A
pow-plusN/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.8%
Applied egg-rr87.8%
Taylor expanded in eps around inf
Simplified87.8%
Final simplification87.8%
herbie shell --seed 2024141
(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)))