
(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 15 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-286)
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-286) {
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-286)) 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-286) {
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-286: 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-286) 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-286) 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-286], 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^{-286}:\\
\;\;\;\;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.00000000000000005e-286 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) Initial program 97.0%
if -1.00000000000000005e-286 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0Initial program 88.7%
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
Simplified100.0%
(FPCore (x eps)
:precision binary64
(if (<= x -5e-52)
(*
eps
(+
(* 5.0 (pow x 4.0))
(*
eps
(+
(* (* x (* x x)) 10.0)
(* eps (+ (* (* x x) 10.0) (* eps (* x 5.0))))))))
(if (<= x 1.45e-61)
(pow eps 5.0)
(*
(pow x 4.0)
(+
(* eps 5.0)
(/ (- (/ (* 10.0 (* eps (* eps eps))) x) (* (* eps eps) -10.0)) x))))))
double code(double x, double eps) {
double tmp;
if (x <= -5e-52) {
tmp = eps * ((5.0 * pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * (((x * x) * 10.0) + (eps * (x * 5.0)))))));
} else if (x <= 1.45e-61) {
tmp = pow(eps, 5.0);
} else {
tmp = pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / 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) :: tmp
if (x <= (-5d-52)) then
tmp = eps * ((5.0d0 * (x ** 4.0d0)) + (eps * (((x * (x * x)) * 10.0d0) + (eps * (((x * x) * 10.0d0) + (eps * (x * 5.0d0)))))))
else if (x <= 1.45d-61) then
tmp = eps ** 5.0d0
else
tmp = (x ** 4.0d0) * ((eps * 5.0d0) + ((((10.0d0 * (eps * (eps * eps))) / x) - ((eps * eps) * (-10.0d0))) / x))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5e-52) {
tmp = eps * ((5.0 * Math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * (((x * x) * 10.0) + (eps * (x * 5.0)))))));
} else if (x <= 1.45e-61) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = Math.pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5e-52: tmp = eps * ((5.0 * math.pow(x, 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * (((x * x) * 10.0) + (eps * (x * 5.0))))))) elif x <= 1.45e-61: tmp = math.pow(eps, 5.0) else: tmp = math.pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x)) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5e-52) 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(Float64(x * x) * 10.0) + Float64(eps * Float64(x * 5.0)))))))); elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = Float64((x ^ 4.0) * Float64(Float64(eps * 5.0) + Float64(Float64(Float64(Float64(10.0 * Float64(eps * Float64(eps * eps))) / x) - Float64(Float64(eps * eps) * -10.0)) / x))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5e-52) tmp = eps * ((5.0 * (x ^ 4.0)) + (eps * (((x * (x * x)) * 10.0) + (eps * (((x * x) * 10.0) + (eps * (x * 5.0))))))); elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = (x ^ 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x)); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5e-52], 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[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] + N[(eps * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e-61], N[Power[eps, 5.0], $MachinePrecision], N[(N[Power[x, 4.0], $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(N[(N[(N[(10.0 * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-52}:\\
\;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4} + \varepsilon \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot 10 + \varepsilon \cdot \left(\left(x \cdot x\right) \cdot 10 + \varepsilon \cdot \left(x \cdot 5\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5 + \frac{\frac{10 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)}{x} - \left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right)\\
\end{array}
\end{array}
if x < -5e-52Initial program 48.1%
Taylor expanded in eps around 0
Simplified92.8%
if -5e-52 < x < 1.45e-61Initial program 100.0%
Taylor expanded in x around 0
pow-lowering-pow.f64100.0%
Simplified100.0%
if 1.45e-61 < x Initial program 44.3%
Taylor expanded in x around -inf
Simplified99.9%
Final simplification99.2%
(FPCore (x eps)
:precision binary64
(let* ((t_0
(*
(pow x 4.0)
(+
(* eps 5.0)
(/
(- (/ (* 10.0 (* eps (* eps eps))) x) (* (* eps eps) -10.0))
x)))))
(if (<= x -4.8e-52) t_0 (if (<= x 1.45e-61) (pow eps 5.0) t_0))))
double code(double x, double eps) {
double t_0 = pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 1.45e-61) {
tmp = pow(eps, 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 ** 4.0d0) * ((eps * 5.0d0) + ((((10.0d0 * (eps * (eps * eps))) / x) - ((eps * eps) * (-10.0d0))) / x))
if (x <= (-4.8d-52)) then
tmp = t_0
else if (x <= 1.45d-61) then
tmp = eps ** 5.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, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 1.45e-61) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = math.pow(x, 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x)) tmp = 0 if x <= -4.8e-52: tmp = t_0 elif x <= 1.45e-61: tmp = math.pow(eps, 5.0) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64((x ^ 4.0) * Float64(Float64(eps * 5.0) + Float64(Float64(Float64(Float64(10.0 * Float64(eps * Float64(eps * eps))) / x) - Float64(Float64(eps * eps) * -10.0)) / x))) tmp = 0.0 if (x <= -4.8e-52) tmp = t_0; elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = (x ^ 4.0) * ((eps * 5.0) + ((((10.0 * (eps * (eps * eps))) / x) - ((eps * eps) * -10.0)) / x)); tmp = 0.0; if (x <= -4.8e-52) tmp = t_0; elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[Power[x, 4.0], $MachinePrecision] * N[(N[(eps * 5.0), $MachinePrecision] + N[(N[(N[(N[(10.0 * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - N[(N[(eps * eps), $MachinePrecision] * -10.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-52], t$95$0, If[LessEqual[x, 1.45e-61], N[Power[eps, 5.0], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{4} \cdot \left(\varepsilon \cdot 5 + \frac{\frac{10 \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)}{x} - \left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.8000000000000003e-52 or 1.45e-61 < x Initial program 46.4%
Taylor expanded in x around -inf
Simplified95.6%
if -4.8000000000000003e-52 < x < 1.45e-61Initial program 100.0%
Taylor expanded in x around 0
pow-lowering-pow.f64100.0%
Simplified100.0%
Final simplification99.2%
(FPCore (x eps)
:precision binary64
(if (<= x -5.4e-52)
(* (pow x 4.0) (- (* eps 5.0) (/ (* (* eps eps) -10.0) x)))
(if (<= x 1.15e-61)
(pow eps 5.0)
(* (pow x 4.0) (* eps (+ 5.0 (/ (* eps 10.0) x)))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.4e-52) {
tmp = pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x));
} else if (x <= 1.15e-61) {
tmp = pow(eps, 5.0);
} else {
tmp = pow(x, 4.0) * (eps * (5.0 + ((eps * 10.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 <= (-5.4d-52)) then
tmp = (x ** 4.0d0) * ((eps * 5.0d0) - (((eps * eps) * (-10.0d0)) / x))
else if (x <= 1.15d-61) then
tmp = eps ** 5.0d0
else
tmp = (x ** 4.0d0) * (eps * (5.0d0 + ((eps * 10.0d0) / x)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.4e-52) {
tmp = Math.pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x));
} else if (x <= 1.15e-61) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = Math.pow(x, 4.0) * (eps * (5.0 + ((eps * 10.0) / x)));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.4e-52: tmp = math.pow(x, 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x)) elif x <= 1.15e-61: tmp = math.pow(eps, 5.0) else: tmp = math.pow(x, 4.0) * (eps * (5.0 + ((eps * 10.0) / x))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.4e-52) tmp = Float64((x ^ 4.0) * Float64(Float64(eps * 5.0) - Float64(Float64(Float64(eps * eps) * -10.0) / x))); elseif (x <= 1.15e-61) tmp = eps ^ 5.0; else tmp = Float64((x ^ 4.0) * Float64(eps * Float64(5.0 + Float64(Float64(eps * 10.0) / x)))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.4e-52) tmp = (x ^ 4.0) * ((eps * 5.0) - (((eps * eps) * -10.0) / x)); elseif (x <= 1.15e-61) tmp = eps ^ 5.0; else tmp = (x ^ 4.0) * (eps * (5.0 + ((eps * 10.0) / x))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.4e-52], 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], If[LessEqual[x, 1.15e-61], N[Power[eps, 5.0], $MachinePrecision], N[(N[Power[x, 4.0], $MachinePrecision] * N[(eps * N[(5.0 + N[(N[(eps * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{-52}:\\
\;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5 - \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot -10}{x}\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon \cdot 10}{x}\right)\right)\\
\end{array}
\end{array}
if x < -5.40000000000000019e-52Initial program 48.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
Simplified90.0%
if -5.40000000000000019e-52 < x < 1.14999999999999996e-61Initial program 100.0%
Taylor expanded in x around 0
pow-lowering-pow.f64100.0%
Simplified100.0%
if 1.14999999999999996e-61 < x Initial program 44.3%
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.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
associate-*l/N/A
associate-*l*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1%
Simplified99.1%
(FPCore (x eps) :precision binary64 (let* ((t_0 (* (pow x 4.0) (* eps (+ 5.0 (/ (* eps 10.0) x)))))) (if (<= x -5e-52) t_0 (if (<= x 1.3e-61) (pow eps 5.0) t_0))))
double code(double x, double eps) {
double t_0 = pow(x, 4.0) * (eps * (5.0 + ((eps * 10.0) / x)));
double tmp;
if (x <= -5e-52) {
tmp = t_0;
} else if (x <= 1.3e-61) {
tmp = pow(eps, 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 ** 4.0d0) * (eps * (5.0d0 + ((eps * 10.0d0) / x)))
if (x <= (-5d-52)) then
tmp = t_0
else if (x <= 1.3d-61) then
tmp = eps ** 5.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, 4.0) * (eps * (5.0 + ((eps * 10.0) / x)));
double tmp;
if (x <= -5e-52) {
tmp = t_0;
} else if (x <= 1.3e-61) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = math.pow(x, 4.0) * (eps * (5.0 + ((eps * 10.0) / x))) tmp = 0 if x <= -5e-52: tmp = t_0 elif x <= 1.3e-61: tmp = math.pow(eps, 5.0) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64((x ^ 4.0) * Float64(eps * Float64(5.0 + Float64(Float64(eps * 10.0) / x)))) tmp = 0.0 if (x <= -5e-52) tmp = t_0; elseif (x <= 1.3e-61) tmp = eps ^ 5.0; else tmp = t_0; end return tmp end
function tmp_2 = code(x, eps) t_0 = (x ^ 4.0) * (eps * (5.0 + ((eps * 10.0) / x))); tmp = 0.0; if (x <= -5e-52) tmp = t_0; elseif (x <= 1.3e-61) tmp = eps ^ 5.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[Power[x, 4.0], $MachinePrecision] * N[(eps * N[(5.0 + N[(N[(eps * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e-52], t$95$0, If[LessEqual[x, 1.3e-61], N[Power[eps, 5.0], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{4} \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon \cdot 10}{x}\right)\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5e-52 or 1.30000000000000005e-61 < x Initial program 46.4%
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.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
associate-*l/N/A
associate-*l*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6493.9%
Simplified93.9%
if -5e-52 < x < 1.30000000000000005e-61Initial program 100.0%
Taylor expanded in x around 0
pow-lowering-pow.f64100.0%
Simplified100.0%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x (* x x)))))
(if (<= x -4.9e-52)
(* (+ (* eps 5.0) (/ (* (* eps eps) 10.0) x)) t_0)
(if (<= x 1.45e-61)
(pow eps 5.0)
(* t_0 (* eps (+ 5.0 (/ (* eps 10.0) x))))))))
double code(double x, double eps) {
double t_0 = x * (x * (x * x));
double tmp;
if (x <= -4.9e-52) {
tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0;
} else if (x <= 1.45e-61) {
tmp = pow(eps, 5.0);
} else {
tmp = t_0 * (eps * (5.0 + ((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 = x * (x * (x * x))
if (x <= (-4.9d-52)) then
tmp = ((eps * 5.0d0) + (((eps * eps) * 10.0d0) / x)) * t_0
else if (x <= 1.45d-61) then
tmp = eps ** 5.0d0
else
tmp = t_0 * (eps * (5.0d0 + ((eps * 10.0d0) / x)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * (x * x));
double tmp;
if (x <= -4.9e-52) {
tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0;
} else if (x <= 1.45e-61) {
tmp = Math.pow(eps, 5.0);
} else {
tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x)));
}
return tmp;
}
def code(x, eps): t_0 = x * (x * (x * x)) tmp = 0 if x <= -4.9e-52: tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0 elif x <= 1.45e-61: tmp = math.pow(eps, 5.0) else: tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x))) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * Float64(x * x))) tmp = 0.0 if (x <= -4.9e-52) tmp = Float64(Float64(Float64(eps * 5.0) + Float64(Float64(Float64(eps * eps) * 10.0) / x)) * t_0); elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = Float64(t_0 * Float64(eps * Float64(5.0 + Float64(Float64(eps * 10.0) / x)))); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * (x * x)); tmp = 0.0; if (x <= -4.9e-52) tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0; elseif (x <= 1.45e-61) tmp = eps ^ 5.0; else tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.9e-52], N[(N[(N[(eps * 5.0), $MachinePrecision] + N[(N[(N[(eps * eps), $MachinePrecision] * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, 1.45e-61], N[Power[eps, 5.0], $MachinePrecision], N[(t$95$0 * N[(eps * N[(5.0 + N[(N[(eps * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{if}\;x \leq -4.9 \cdot 10^{-52}:\\
\;\;\;\;\left(\varepsilon \cdot 5 + \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot 10}{x}\right) \cdot t\_0\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-61}:\\
\;\;\;\;{\varepsilon}^{5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon \cdot 10}{x}\right)\right)\\
\end{array}
\end{array}
if x < -4.90000000000000019e-52Initial program 48.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
Simplified90.0%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6489.8%
Applied egg-rr89.8%
if -4.90000000000000019e-52 < x < 1.45e-61Initial program 100.0%
Taylor expanded in x around 0
pow-lowering-pow.f64100.0%
Simplified100.0%
if 1.45e-61 < x Initial program 44.3%
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.1%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6499.0%
Applied egg-rr99.0%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x (* x x)))))
(if (<= x -5.5e-52)
(* (+ (* eps 5.0) (/ (* (* eps eps) 10.0) x)) t_0)
(if (<= x 8.8e-62)
(* eps (* eps (* eps (* eps eps))))
(* t_0 (* eps (+ 5.0 (/ (* eps 10.0) x))))))))
double code(double x, double eps) {
double t_0 = x * (x * (x * x));
double tmp;
if (x <= -5.5e-52) {
tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0;
} else if (x <= 8.8e-62) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * (5.0 + ((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 = x * (x * (x * x))
if (x <= (-5.5d-52)) then
tmp = ((eps * 5.0d0) + (((eps * eps) * 10.0d0) / x)) * t_0
else if (x <= 8.8d-62) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = t_0 * (eps * (5.0d0 + ((eps * 10.0d0) / x)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * (x * x));
double tmp;
if (x <= -5.5e-52) {
tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0;
} else if (x <= 8.8e-62) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x)));
}
return tmp;
}
def code(x, eps): t_0 = x * (x * (x * x)) tmp = 0 if x <= -5.5e-52: tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0 elif x <= 8.8e-62: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x))) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * Float64(x * x))) tmp = 0.0 if (x <= -5.5e-52) tmp = Float64(Float64(Float64(eps * 5.0) + Float64(Float64(Float64(eps * eps) * 10.0) / x)) * t_0); elseif (x <= 8.8e-62) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = Float64(t_0 * Float64(eps * Float64(5.0 + Float64(Float64(eps * 10.0) / x)))); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * (x * x)); tmp = 0.0; if (x <= -5.5e-52) tmp = ((eps * 5.0) + (((eps * eps) * 10.0) / x)) * t_0; elseif (x <= 8.8e-62) tmp = eps * (eps * (eps * (eps * eps))); else tmp = t_0 * (eps * (5.0 + ((eps * 10.0) / x))); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e-52], N[(N[(N[(eps * 5.0), $MachinePrecision] + N[(N[(N[(eps * eps), $MachinePrecision] * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, 8.8e-62], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(eps * N[(5.0 + N[(N[(eps * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-52}:\\
\;\;\;\;\left(\varepsilon \cdot 5 + \frac{\left(\varepsilon \cdot \varepsilon\right) \cdot 10}{x}\right) \cdot t\_0\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-62}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon \cdot 10}{x}\right)\right)\\
\end{array}
\end{array}
if x < -5.5e-52Initial program 48.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
Simplified90.0%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6489.8%
Applied egg-rr89.8%
if -5.5e-52 < x < 8.80000000000000069e-62Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
if 8.80000000000000069e-62 < x Initial program 44.3%
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.1%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6499.0%
Applied egg-rr99.0%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.0%
Simplified99.0%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* (* x (* x (* x x))) (* eps (+ 5.0 (/ (* eps 10.0) x))))))
(if (<= x -5.5e-52)
t_0
(if (<= x 9e-62) (* eps (* eps (* eps (* eps eps)))) t_0))))
double code(double x, double eps) {
double t_0 = (x * (x * (x * x))) * (eps * (5.0 + ((eps * 10.0) / x)));
double tmp;
if (x <= -5.5e-52) {
tmp = t_0;
} else if (x <= 9e-62) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = (x * (x * (x * x))) * (eps * (5.0d0 + ((eps * 10.0d0) / x)))
if (x <= (-5.5d-52)) then
tmp = t_0
else if (x <= 9d-62) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = (x * (x * (x * x))) * (eps * (5.0 + ((eps * 10.0) / x)));
double tmp;
if (x <= -5.5e-52) {
tmp = t_0;
} else if (x <= 9e-62) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = (x * (x * (x * x))) * (eps * (5.0 + ((eps * 10.0) / x))) tmp = 0 if x <= -5.5e-52: tmp = t_0 elif x <= 9e-62: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(Float64(x * Float64(x * Float64(x * x))) * Float64(eps * Float64(5.0 + Float64(Float64(eps * 10.0) / x)))) tmp = 0.0 if (x <= -5.5e-52) tmp = t_0; elseif (x <= 9e-62) 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 = (x * (x * (x * x))) * (eps * (5.0 + ((eps * 10.0) / x))); tmp = 0.0; if (x <= -5.5e-52) tmp = t_0; elseif (x <= 9e-62) tmp = eps * (eps * (eps * (eps * eps))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(eps * N[(5.0 + N[(N[(eps * 10.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e-52], t$95$0, If[LessEqual[x, 9e-62], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(\varepsilon \cdot \left(5 + \frac{\varepsilon \cdot 10}{x}\right)\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-62}:\\
\;\;\;\;\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.5e-52 or 9.00000000000000036e-62 < x Initial program 46.4%
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.0%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6493.8%
Applied egg-rr93.8%
Taylor expanded in eps around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6493.8%
Simplified93.8%
if -5.5e-52 < x < 9.00000000000000036e-62Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification98.8%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* x (* x x))) (t_1 (+ (* eps 10.0) (* x 5.0))))
(if (<= x -4.8e-52)
(* eps (* t_0 t_1))
(if (<= x 1.45e-61)
(* eps (* eps (* eps (* eps eps))))
(* t_0 (* eps t_1))))))
double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (eps * 10.0) + (x * 5.0);
double tmp;
if (x <= -4.8e-52) {
tmp = eps * (t_0 * t_1);
} else if (x <= 1.45e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * t_1);
}
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 = (eps * 10.0d0) + (x * 5.0d0)
if (x <= (-4.8d-52)) then
tmp = eps * (t_0 * t_1)
else if (x <= 1.45d-61) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = t_0 * (eps * t_1)
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = x * (x * x);
double t_1 = (eps * 10.0) + (x * 5.0);
double tmp;
if (x <= -4.8e-52) {
tmp = eps * (t_0 * t_1);
} else if (x <= 1.45e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0 * (eps * t_1);
}
return tmp;
}
def code(x, eps): t_0 = x * (x * x) t_1 = (eps * 10.0) + (x * 5.0) tmp = 0 if x <= -4.8e-52: tmp = eps * (t_0 * t_1) elif x <= 1.45e-61: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 * (eps * t_1) return tmp
function code(x, eps) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(eps * 10.0) + Float64(x * 5.0)) tmp = 0.0 if (x <= -4.8e-52) tmp = Float64(eps * Float64(t_0 * t_1)); elseif (x <= 1.45e-61) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = Float64(t_0 * Float64(eps * t_1)); end return tmp end
function tmp_2 = code(x, eps) t_0 = x * (x * x); t_1 = (eps * 10.0) + (x * 5.0); tmp = 0.0; if (x <= -4.8e-52) tmp = eps * (t_0 * t_1); elseif (x <= 1.45e-61) tmp = eps * (eps * (eps * (eps * eps))); else tmp = t_0 * (eps * t_1); 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[(eps * 10.0), $MachinePrecision] + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-52], N[(eps * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e-61], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(eps * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := \varepsilon \cdot 10 + x \cdot 5\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;\varepsilon \cdot \left(t\_0 \cdot t\_1\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-61}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\varepsilon \cdot t\_1\right)\\
\end{array}
\end{array}
if x < -4.8000000000000003e-52Initial program 48.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
Simplified90.0%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6489.8%
Applied egg-rr89.8%
Taylor expanded in eps around 0
distribute-rgt-inN/A
*-rgt-identityN/A
rgt-mult-inverseN/A
associate-*l*N/A
unpow2N/A
associate-*r/N/A
*-rgt-identityN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
distribute-rgt-inN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified89.5%
if -4.8000000000000003e-52 < x < 1.45e-61Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1.45e-61 < x Initial program 44.3%
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.1%
Taylor expanded in x around 0
metadata-evalN/A
cancel-sign-sub-invN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/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-*.f6498.8%
Simplified98.8%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* (* x (* x x)) (+ (* eps 10.0) (* x 5.0))))))
(if (<= x -4.8e-52)
t_0
(if (<= x 1.05e-61) (* eps (* eps (* eps (* eps eps)))) t_0))))
double code(double x, double eps) {
double t_0 = eps * ((x * (x * x)) * ((eps * 10.0) + (x * 5.0)));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 1.05e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = eps * ((x * (x * x)) * ((eps * 10.0d0) + (x * 5.0d0)))
if (x <= (-4.8d-52)) then
tmp = t_0
else if (x <= 1.05d-61) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = eps * ((x * (x * x)) * ((eps * 10.0) + (x * 5.0)));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 1.05e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * ((x * (x * x)) * ((eps * 10.0) + (x * 5.0))) tmp = 0 if x <= -4.8e-52: tmp = t_0 elif x <= 1.05e-61: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(Float64(x * Float64(x * x)) * Float64(Float64(eps * 10.0) + Float64(x * 5.0)))) tmp = 0.0 if (x <= -4.8e-52) tmp = t_0; elseif (x <= 1.05e-61) 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 * (x * x)) * ((eps * 10.0) + (x * 5.0))); tmp = 0.0; if (x <= -4.8e-52) tmp = t_0; elseif (x <= 1.05e-61) 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[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(eps * 10.0), $MachinePrecision] + N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-52], t$95$0, If[LessEqual[x, 1.05e-61], 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(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\varepsilon \cdot 10 + x \cdot 5\right)\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-61}:\\
\;\;\;\;\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 < -4.8000000000000003e-52 or 1.05e-61 < x Initial program 46.4%
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.0%
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/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-*.f6493.8%
Applied egg-rr93.8%
Taylor expanded in eps around 0
distribute-rgt-inN/A
*-rgt-identityN/A
rgt-mult-inverseN/A
associate-*l*N/A
unpow2N/A
associate-*r/N/A
*-rgt-identityN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
distribute-rgt-inN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified93.5%
if -4.8000000000000003e-52 < x < 1.05e-61Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification98.7%
(FPCore (x eps)
:precision binary64
(if (<= x -4.8e-52)
(* eps (* x (* x (* 5.0 (* x x)))))
(if (<= x 1.3e-61)
(* eps (* eps (* eps (* eps eps))))
(* (* eps 5.0) (* x (* x (* x x)))))))
double code(double x, double eps) {
double tmp;
if (x <= -4.8e-52) {
tmp = eps * (x * (x * (5.0 * (x * x))));
} else if (x <= 1.3e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = (eps * 5.0) * (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 <= (-4.8d-52)) then
tmp = eps * (x * (x * (5.0d0 * (x * x))))
else if (x <= 1.3d-61) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = (eps * 5.0d0) * (x * (x * (x * x)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -4.8e-52) {
tmp = eps * (x * (x * (5.0 * (x * x))));
} else if (x <= 1.3e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = (eps * 5.0) * (x * (x * (x * x)));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -4.8e-52: tmp = eps * (x * (x * (5.0 * (x * x)))) elif x <= 1.3e-61: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = (eps * 5.0) * (x * (x * (x * x))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -4.8e-52) tmp = Float64(eps * Float64(x * Float64(x * Float64(5.0 * Float64(x * x))))); elseif (x <= 1.3e-61) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = Float64(Float64(eps * 5.0) * Float64(x * Float64(x * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -4.8e-52) tmp = eps * (x * (x * (5.0 * (x * x)))); elseif (x <= 1.3e-61) tmp = eps * (eps * (eps * (eps * eps))); else tmp = (eps * 5.0) * (x * (x * (x * x))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -4.8e-52], N[(eps * N[(x * N[(x * N[(5.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e-61], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(eps * 5.0), $MachinePrecision] * N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(x \cdot \left(5 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-61}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\varepsilon \cdot 5\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.8000000000000003e-52Initial program 48.1%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6486.8%
Simplified86.8%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.6%
Applied egg-rr86.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.8%
Applied egg-rr86.8%
if -4.8000000000000003e-52 < x < 1.30000000000000005e-61Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1.30000000000000005e-61 < x Initial program 44.3%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6497.4%
Simplified97.4%
associate-*r*N/A
*-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-*.f64N/A
*-lowering-*.f6497.4%
Applied egg-rr97.4%
Final simplification98.3%
(FPCore (x eps)
:precision binary64
(if (<= x -5.2e-52)
(* eps (* x (* x (* 5.0 (* x x)))))
(if (<= x 1.45e-61)
(* eps (* eps (* eps (* eps eps))))
(* (* x x) (* eps (* x (* x 5.0)))))))
double code(double x, double eps) {
double tmp;
if (x <= -5.2e-52) {
tmp = eps * (x * (x * (5.0 * (x * x))));
} else if (x <= 1.45e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = (x * x) * (eps * (x * (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.2d-52)) then
tmp = eps * (x * (x * (5.0d0 * (x * x))))
else if (x <= 1.45d-61) then
tmp = eps * (eps * (eps * (eps * eps)))
else
tmp = (x * x) * (eps * (x * (x * 5.0d0)))
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (x <= -5.2e-52) {
tmp = eps * (x * (x * (5.0 * (x * x))));
} else if (x <= 1.45e-61) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = (x * x) * (eps * (x * (x * 5.0)));
}
return tmp;
}
def code(x, eps): tmp = 0 if x <= -5.2e-52: tmp = eps * (x * (x * (5.0 * (x * x)))) elif x <= 1.45e-61: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = (x * x) * (eps * (x * (x * 5.0))) return tmp
function code(x, eps) tmp = 0.0 if (x <= -5.2e-52) tmp = Float64(eps * Float64(x * Float64(x * Float64(5.0 * Float64(x * x))))); elseif (x <= 1.45e-61) tmp = Float64(eps * Float64(eps * Float64(eps * Float64(eps * eps)))); else tmp = Float64(Float64(x * x) * Float64(eps * Float64(x * Float64(x * 5.0)))); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (x <= -5.2e-52) tmp = eps * (x * (x * (5.0 * (x * x)))); elseif (x <= 1.45e-61) tmp = eps * (eps * (eps * (eps * eps))); else tmp = (x * x) * (eps * (x * (x * 5.0))); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[x, -5.2e-52], N[(eps * N[(x * N[(x * N[(5.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e-61], N[(eps * N[(eps * N[(eps * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(eps * N[(x * N[(x * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-52}:\\
\;\;\;\;\varepsilon \cdot \left(x \cdot \left(x \cdot \left(5 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-61}:\\
\;\;\;\;\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\varepsilon \cdot \left(x \cdot \left(x \cdot 5\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.1999999999999997e-52Initial program 48.1%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6486.8%
Simplified86.8%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.6%
Applied egg-rr86.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.8%
Applied egg-rr86.8%
if -5.1999999999999997e-52 < x < 1.45e-61Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
if 1.45e-61 < x Initial program 44.3%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6497.4%
Simplified97.4%
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.2%
Applied egg-rr97.2%
Taylor expanded in eps around 0
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6497.2%
Simplified97.2%
Final simplification98.3%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* x (* x (* 5.0 (* x x)))))))
(if (<= x -4.8e-52)
t_0
(if (<= x 2.2e-62) (* eps (* eps (* eps (* eps eps)))) t_0))))
double code(double x, double eps) {
double t_0 = eps * (x * (x * (5.0 * (x * x))));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 2.2e-62) {
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 * (x * (5.0d0 * (x * x))))
if (x <= (-4.8d-52)) then
tmp = t_0
else if (x <= 2.2d-62) 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 * (x * (5.0 * (x * x))));
double tmp;
if (x <= -4.8e-52) {
tmp = t_0;
} else if (x <= 2.2e-62) {
tmp = eps * (eps * (eps * (eps * eps)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, eps): t_0 = eps * (x * (x * (5.0 * (x * x)))) tmp = 0 if x <= -4.8e-52: tmp = t_0 elif x <= 2.2e-62: tmp = eps * (eps * (eps * (eps * eps))) else: tmp = t_0 return tmp
function code(x, eps) t_0 = Float64(eps * Float64(x * Float64(x * Float64(5.0 * Float64(x * x))))) tmp = 0.0 if (x <= -4.8e-52) tmp = t_0; elseif (x <= 2.2e-62) 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 * (x * (5.0 * (x * x)))); tmp = 0.0; if (x <= -4.8e-52) tmp = t_0; elseif (x <= 2.2e-62) 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[(x * N[(5.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-52], t$95$0, If[LessEqual[x, 2.2e-62], 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(x \cdot \left(5 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-62}:\\
\;\;\;\;\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 < -4.8000000000000003e-52 or 2.20000000000000017e-62 < x Initial program 46.4%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6491.4%
Simplified91.4%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.2%
Applied egg-rr91.2%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.4%
Applied egg-rr91.4%
if -4.8000000000000003e-52 < x < 2.20000000000000017e-62Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification98.3%
(FPCore (x eps)
:precision binary64
(let* ((t_0 (* eps (* 5.0 (* (* x x) (* x x))))))
(if (<= x -4.8e-52)
t_0
(if (<= x 2.2e-62) (* 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 <= -4.8e-52) {
tmp = t_0;
} else if (x <= 2.2e-62) {
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 <= (-4.8d-52)) then
tmp = t_0
else if (x <= 2.2d-62) 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 <= -4.8e-52) {
tmp = t_0;
} else if (x <= 2.2e-62) {
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 <= -4.8e-52: tmp = t_0 elif x <= 2.2e-62: 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 <= -4.8e-52) tmp = t_0; elseif (x <= 2.2e-62) 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 <= -4.8e-52) tmp = t_0; elseif (x <= 2.2e-62) 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, -4.8e-52], t$95$0, If[LessEqual[x, 2.2e-62], 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 -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-62}:\\
\;\;\;\;\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 < -4.8000000000000003e-52 or 2.20000000000000017e-62 < x Initial program 46.4%
Taylor expanded in x around inf
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
distribute-lft1-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6491.4%
Simplified91.4%
metadata-evalN/A
pow-sqrN/A
pow2N/A
pow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.2%
Applied egg-rr91.2%
if -4.8000000000000003e-52 < x < 2.20000000000000017e-62Initial program 100.0%
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
Simplified91.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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.9%
Simplified99.9%
(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 90.0%
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
Simplified77.5%
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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.7%
Simplified88.7%
Taylor expanded in eps around inf
metadata-evalN/A
pow-plusN/A
metadata-evalN/A
pow-plusN/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
pow-plusN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.6%
Simplified88.6%
herbie shell --seed 2024156
(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)))