
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (fma y x (* (* a b) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = fma(y, x, ((a * b) * -0.25));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = fma(y, x, Float64(Float64(a * b) * -0.25)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(y * x + N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(a \cdot b\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in z around 0 54.5%
Taylor expanded in c around 0 54.5%
*-commutative54.5%
fma-neg63.6%
*-commutative63.6%
distribute-rgt-neg-in63.6%
metadata-eval63.6%
Applied egg-rr63.6%
Final simplification98.4%
(FPCore (x y z t a b c) :precision binary64 (fma x y (fma (/ z 16.0) t (fma (/ a -4.0) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma((z / 16.0), t, fma((a / -4.0), b, c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(Float64(z / 16.0), t, fma(Float64(a / -4.0), b, c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(N[(z / 16.0), $MachinePrecision] * t + N[(N[(a / -4.0), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right)
\end{array}
Initial program 95.7%
associate-+l-95.7%
associate--l+95.7%
fma-def96.5%
associate-*l/96.5%
fma-neg98.0%
sub-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
associate-/l*98.0%
distribute-frac-neg98.0%
associate-/r/98.0%
fma-def98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
metadata-eval98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t))))
(t_2 (+ c (* x y)))
(t_3 (+ c (* a (* b -0.25)))))
(if (<= (* x y) -5.2e+204)
t_2
(if (<= (* x y) -6.2e+165)
t_1
(if (<= (* x y) -2.2e+81)
t_2
(if (<= (* x y) -0.00044)
t_3
(if (<= (* x y) -4.4e-304)
t_1
(if (<= (* x y) 2.05e-196)
t_3
(if (<= (* x y) 4.3e-83)
t_1
(if (<= (* x y) 1.9e+14)
t_3
(if (<= (* x y) 1e+80)
t_1
(if (<= (* x y) 3.8e+119) t_3 t_2))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = c + (a * (b * -0.25));
double tmp;
if ((x * y) <= -5.2e+204) {
tmp = t_2;
} else if ((x * y) <= -6.2e+165) {
tmp = t_1;
} else if ((x * y) <= -2.2e+81) {
tmp = t_2;
} else if ((x * y) <= -0.00044) {
tmp = t_3;
} else if ((x * y) <= -4.4e-304) {
tmp = t_1;
} else if ((x * y) <= 2.05e-196) {
tmp = t_3;
} else if ((x * y) <= 4.3e-83) {
tmp = t_1;
} else if ((x * y) <= 1.9e+14) {
tmp = t_3;
} else if ((x * y) <= 1e+80) {
tmp = t_1;
} else if ((x * y) <= 3.8e+119) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (0.0625d0 * (z * t))
t_2 = c + (x * y)
t_3 = c + (a * (b * (-0.25d0)))
if ((x * y) <= (-5.2d+204)) then
tmp = t_2
else if ((x * y) <= (-6.2d+165)) then
tmp = t_1
else if ((x * y) <= (-2.2d+81)) then
tmp = t_2
else if ((x * y) <= (-0.00044d0)) then
tmp = t_3
else if ((x * y) <= (-4.4d-304)) then
tmp = t_1
else if ((x * y) <= 2.05d-196) then
tmp = t_3
else if ((x * y) <= 4.3d-83) then
tmp = t_1
else if ((x * y) <= 1.9d+14) then
tmp = t_3
else if ((x * y) <= 1d+80) then
tmp = t_1
else if ((x * y) <= 3.8d+119) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double t_3 = c + (a * (b * -0.25));
double tmp;
if ((x * y) <= -5.2e+204) {
tmp = t_2;
} else if ((x * y) <= -6.2e+165) {
tmp = t_1;
} else if ((x * y) <= -2.2e+81) {
tmp = t_2;
} else if ((x * y) <= -0.00044) {
tmp = t_3;
} else if ((x * y) <= -4.4e-304) {
tmp = t_1;
} else if ((x * y) <= 2.05e-196) {
tmp = t_3;
} else if ((x * y) <= 4.3e-83) {
tmp = t_1;
} else if ((x * y) <= 1.9e+14) {
tmp = t_3;
} else if ((x * y) <= 1e+80) {
tmp = t_1;
} else if ((x * y) <= 3.8e+119) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (x * y) t_3 = c + (a * (b * -0.25)) tmp = 0 if (x * y) <= -5.2e+204: tmp = t_2 elif (x * y) <= -6.2e+165: tmp = t_1 elif (x * y) <= -2.2e+81: tmp = t_2 elif (x * y) <= -0.00044: tmp = t_3 elif (x * y) <= -4.4e-304: tmp = t_1 elif (x * y) <= 2.05e-196: tmp = t_3 elif (x * y) <= 4.3e-83: tmp = t_1 elif (x * y) <= 1.9e+14: tmp = t_3 elif (x * y) <= 1e+80: tmp = t_1 elif (x * y) <= 3.8e+119: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(c + Float64(a * Float64(b * -0.25))) tmp = 0.0 if (Float64(x * y) <= -5.2e+204) tmp = t_2; elseif (Float64(x * y) <= -6.2e+165) tmp = t_1; elseif (Float64(x * y) <= -2.2e+81) tmp = t_2; elseif (Float64(x * y) <= -0.00044) tmp = t_3; elseif (Float64(x * y) <= -4.4e-304) tmp = t_1; elseif (Float64(x * y) <= 2.05e-196) tmp = t_3; elseif (Float64(x * y) <= 4.3e-83) tmp = t_1; elseif (Float64(x * y) <= 1.9e+14) tmp = t_3; elseif (Float64(x * y) <= 1e+80) tmp = t_1; elseif (Float64(x * y) <= 3.8e+119) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); t_2 = c + (x * y); t_3 = c + (a * (b * -0.25)); tmp = 0.0; if ((x * y) <= -5.2e+204) tmp = t_2; elseif ((x * y) <= -6.2e+165) tmp = t_1; elseif ((x * y) <= -2.2e+81) tmp = t_2; elseif ((x * y) <= -0.00044) tmp = t_3; elseif ((x * y) <= -4.4e-304) tmp = t_1; elseif ((x * y) <= 2.05e-196) tmp = t_3; elseif ((x * y) <= 4.3e-83) tmp = t_1; elseif ((x * y) <= 1.9e+14) tmp = t_3; elseif ((x * y) <= 1e+80) tmp = t_1; elseif ((x * y) <= 3.8e+119) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5.2e+204], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -6.2e+165], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2.2e+81], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -0.00044], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -4.4e-304], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.05e-196], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 4.3e-83], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.9e+14], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1e+80], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+119], t$95$3, t$95$2]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
t_3 := c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+204}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -2.2 \cdot 10^{+81}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -0.00044:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq -4.4 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2.05 \cdot 10^{-196}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+119}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -5.2000000000000002e204 or -6.2000000000000003e165 < (*.f64 x y) < -2.19999999999999987e81 or 3.7999999999999999e119 < (*.f64 x y) Initial program 90.1%
Taylor expanded in x around inf 86.7%
if -5.2000000000000002e204 < (*.f64 x y) < -6.2000000000000003e165 or -4.40000000000000016e-4 < (*.f64 x y) < -4.4e-304 or 2.05000000000000011e-196 < (*.f64 x y) < 4.30000000000000033e-83 or 1.9e14 < (*.f64 x y) < 1e80Initial program 100.0%
Taylor expanded in z around inf 69.2%
if -2.19999999999999987e81 < (*.f64 x y) < -4.40000000000000016e-4 or -4.4e-304 < (*.f64 x y) < 2.05000000000000011e-196 or 4.30000000000000033e-83 < (*.f64 x y) < 1.9e14 or 1e80 < (*.f64 x y) < 3.7999999999999999e119Initial program 95.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
associate-*r*77.0%
Simplified77.0%
Final simplification76.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* a (* b -0.25))))
(t_2 (* 0.0625 (* z t)))
(t_3 (+ c t_2))
(t_4 (+ (* x y) t_2)))
(if (<= (* x y) -1.55e+80)
t_4
(if (<= (* x y) -5.3e-5)
t_1
(if (<= (* x y) -7.8e-299)
t_3
(if (<= (* x y) 6.5e-202)
t_1
(if (<= (* x y) 2.35e-82)
t_3
(if (<= (* x y) 2.9e+21)
t_1
(if (<= (* x y) 9.6e+79)
t_4
(if (<= (* x y) 2.6e+123) t_1 (+ c (* x y))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (a * (b * -0.25));
double t_2 = 0.0625 * (z * t);
double t_3 = c + t_2;
double t_4 = (x * y) + t_2;
double tmp;
if ((x * y) <= -1.55e+80) {
tmp = t_4;
} else if ((x * y) <= -5.3e-5) {
tmp = t_1;
} else if ((x * y) <= -7.8e-299) {
tmp = t_3;
} else if ((x * y) <= 6.5e-202) {
tmp = t_1;
} else if ((x * y) <= 2.35e-82) {
tmp = t_3;
} else if ((x * y) <= 2.9e+21) {
tmp = t_1;
} else if ((x * y) <= 9.6e+79) {
tmp = t_4;
} else if ((x * y) <= 2.6e+123) {
tmp = t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = c + (a * (b * (-0.25d0)))
t_2 = 0.0625d0 * (z * t)
t_3 = c + t_2
t_4 = (x * y) + t_2
if ((x * y) <= (-1.55d+80)) then
tmp = t_4
else if ((x * y) <= (-5.3d-5)) then
tmp = t_1
else if ((x * y) <= (-7.8d-299)) then
tmp = t_3
else if ((x * y) <= 6.5d-202) then
tmp = t_1
else if ((x * y) <= 2.35d-82) then
tmp = t_3
else if ((x * y) <= 2.9d+21) then
tmp = t_1
else if ((x * y) <= 9.6d+79) then
tmp = t_4
else if ((x * y) <= 2.6d+123) then
tmp = t_1
else
tmp = c + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (a * (b * -0.25));
double t_2 = 0.0625 * (z * t);
double t_3 = c + t_2;
double t_4 = (x * y) + t_2;
double tmp;
if ((x * y) <= -1.55e+80) {
tmp = t_4;
} else if ((x * y) <= -5.3e-5) {
tmp = t_1;
} else if ((x * y) <= -7.8e-299) {
tmp = t_3;
} else if ((x * y) <= 6.5e-202) {
tmp = t_1;
} else if ((x * y) <= 2.35e-82) {
tmp = t_3;
} else if ((x * y) <= 2.9e+21) {
tmp = t_1;
} else if ((x * y) <= 9.6e+79) {
tmp = t_4;
} else if ((x * y) <= 2.6e+123) {
tmp = t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (a * (b * -0.25)) t_2 = 0.0625 * (z * t) t_3 = c + t_2 t_4 = (x * y) + t_2 tmp = 0 if (x * y) <= -1.55e+80: tmp = t_4 elif (x * y) <= -5.3e-5: tmp = t_1 elif (x * y) <= -7.8e-299: tmp = t_3 elif (x * y) <= 6.5e-202: tmp = t_1 elif (x * y) <= 2.35e-82: tmp = t_3 elif (x * y) <= 2.9e+21: tmp = t_1 elif (x * y) <= 9.6e+79: tmp = t_4 elif (x * y) <= 2.6e+123: tmp = t_1 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(a * Float64(b * -0.25))) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(c + t_2) t_4 = Float64(Float64(x * y) + t_2) tmp = 0.0 if (Float64(x * y) <= -1.55e+80) tmp = t_4; elseif (Float64(x * y) <= -5.3e-5) tmp = t_1; elseif (Float64(x * y) <= -7.8e-299) tmp = t_3; elseif (Float64(x * y) <= 6.5e-202) tmp = t_1; elseif (Float64(x * y) <= 2.35e-82) tmp = t_3; elseif (Float64(x * y) <= 2.9e+21) tmp = t_1; elseif (Float64(x * y) <= 9.6e+79) tmp = t_4; elseif (Float64(x * y) <= 2.6e+123) tmp = t_1; else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (a * (b * -0.25)); t_2 = 0.0625 * (z * t); t_3 = c + t_2; t_4 = (x * y) + t_2; tmp = 0.0; if ((x * y) <= -1.55e+80) tmp = t_4; elseif ((x * y) <= -5.3e-5) tmp = t_1; elseif ((x * y) <= -7.8e-299) tmp = t_3; elseif ((x * y) <= 6.5e-202) tmp = t_1; elseif ((x * y) <= 2.35e-82) tmp = t_3; elseif ((x * y) <= 2.9e+21) tmp = t_1; elseif ((x * y) <= 9.6e+79) tmp = t_4; elseif ((x * y) <= 2.6e+123) tmp = t_1; else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.55e+80], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], -5.3e-5], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -7.8e-299], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 6.5e-202], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.35e-82], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 2.9e+21], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 9.6e+79], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], 2.6e+123], t$95$1, N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + t_2\\
t_4 := x \cdot y + t_2\\
\mathbf{if}\;x \cdot y \leq -1.55 \cdot 10^{+80}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \cdot y \leq -5.3 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -7.8 \cdot 10^{-299}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 6.5 \cdot 10^{-202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2.35 \cdot 10^{-82}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 2.9 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{+79}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.54999999999999994e80 or 2.9e21 < (*.f64 x y) < 9.59999999999999942e79Initial program 94.9%
associate-+l-94.9%
associate--l+94.9%
fma-def94.9%
associate-*l/94.9%
fma-neg94.9%
sub-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
associate-/l*94.9%
distribute-frac-neg94.9%
associate-/r/94.9%
fma-def94.9%
neg-mul-194.9%
*-commutative94.9%
associate-/l*94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in a around 0 85.3%
+-commutative85.3%
*-commutative85.3%
associate-*r*85.3%
fma-def85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in c around 0 77.9%
if -1.54999999999999994e80 < (*.f64 x y) < -5.3000000000000001e-5 or -7.7999999999999997e-299 < (*.f64 x y) < 6.49999999999999956e-202 or 2.35e-82 < (*.f64 x y) < 2.9e21 or 9.59999999999999942e79 < (*.f64 x y) < 2.59999999999999985e123Initial program 95.8%
Taylor expanded in a around inf 77.2%
*-commutative77.2%
associate-*r*77.2%
Simplified77.2%
if -5.3000000000000001e-5 < (*.f64 x y) < -7.7999999999999997e-299 or 6.49999999999999956e-202 < (*.f64 x y) < 2.35e-82Initial program 100.0%
Taylor expanded in z around inf 70.0%
if 2.59999999999999985e123 < (*.f64 x y) Initial program 88.8%
Taylor expanded in x around inf 89.1%
Final simplification77.2%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (- (+ c (* x y)) (* (* a b) 0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = (c + (x * y)) - ((a * b) * 0.25);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = (c + (x * y)) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = (c + (x * y)) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = (c + (x * y)) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in z around 0 54.5%
Final simplification98.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (- (* x y) (* (* a b) 0.25))))
(if (<= (* a b) -2e+143)
t_2
(if (<= (* a b) -2e+90)
(+ c t_1)
(if (<= (* a b) -1e+49)
t_2
(if (<= (* a b) 1e-92)
(+ c (* x y))
(if (<= (* a b) 5e+84)
(+ (* x y) t_1)
(+ c (* a (* b -0.25))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (x * y) - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -2e+143) {
tmp = t_2;
} else if ((a * b) <= -2e+90) {
tmp = c + t_1;
} else if ((a * b) <= -1e+49) {
tmp = t_2;
} else if ((a * b) <= 1e-92) {
tmp = c + (x * y);
} else if ((a * b) <= 5e+84) {
tmp = (x * y) + t_1;
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (x * y) - ((a * b) * 0.25d0)
if ((a * b) <= (-2d+143)) then
tmp = t_2
else if ((a * b) <= (-2d+90)) then
tmp = c + t_1
else if ((a * b) <= (-1d+49)) then
tmp = t_2
else if ((a * b) <= 1d-92) then
tmp = c + (x * y)
else if ((a * b) <= 5d+84) then
tmp = (x * y) + t_1
else
tmp = c + (a * (b * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (x * y) - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -2e+143) {
tmp = t_2;
} else if ((a * b) <= -2e+90) {
tmp = c + t_1;
} else if ((a * b) <= -1e+49) {
tmp = t_2;
} else if ((a * b) <= 1e-92) {
tmp = c + (x * y);
} else if ((a * b) <= 5e+84) {
tmp = (x * y) + t_1;
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (x * y) - ((a * b) * 0.25) tmp = 0 if (a * b) <= -2e+143: tmp = t_2 elif (a * b) <= -2e+90: tmp = c + t_1 elif (a * b) <= -1e+49: tmp = t_2 elif (a * b) <= 1e-92: tmp = c + (x * y) elif (a * b) <= 5e+84: tmp = (x * y) + t_1 else: tmp = c + (a * (b * -0.25)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)) tmp = 0.0 if (Float64(a * b) <= -2e+143) tmp = t_2; elseif (Float64(a * b) <= -2e+90) tmp = Float64(c + t_1); elseif (Float64(a * b) <= -1e+49) tmp = t_2; elseif (Float64(a * b) <= 1e-92) tmp = Float64(c + Float64(x * y)); elseif (Float64(a * b) <= 5e+84) tmp = Float64(Float64(x * y) + t_1); else tmp = Float64(c + Float64(a * Float64(b * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (x * y) - ((a * b) * 0.25); tmp = 0.0; if ((a * b) <= -2e+143) tmp = t_2; elseif ((a * b) <= -2e+90) tmp = c + t_1; elseif ((a * b) <= -1e+49) tmp = t_2; elseif ((a * b) <= 1e-92) tmp = c + (x * y); elseif ((a * b) <= 5e+84) tmp = (x * y) + t_1; else tmp = c + (a * (b * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+143], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -2e+90], N[(c + t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -1e+49], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 1e-92], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+84], N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{+90}:\\
\;\;\;\;c + t_1\\
\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 10^{-92}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+84}:\\
\;\;\;\;x \cdot y + t_1\\
\mathbf{else}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -2e143 or -1.99999999999999993e90 < (*.f64 a b) < -9.99999999999999946e48Initial program 91.1%
Taylor expanded in z around 0 80.2%
Taylor expanded in c around 0 74.5%
if -2e143 < (*.f64 a b) < -1.99999999999999993e90Initial program 100.0%
Taylor expanded in z around inf 82.7%
if -9.99999999999999946e48 < (*.f64 a b) < 9.99999999999999988e-93Initial program 98.3%
Taylor expanded in x around inf 72.1%
if 9.99999999999999988e-93 < (*.f64 a b) < 5.0000000000000001e84Initial program 97.6%
associate-+l-97.6%
associate--l+97.6%
fma-def97.6%
associate-*l/97.6%
fma-neg97.6%
sub-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
associate-/l*97.5%
distribute-frac-neg97.5%
associate-/r/97.6%
fma-def97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in a around 0 85.8%
+-commutative85.8%
*-commutative85.8%
associate-*r*85.8%
fma-def85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in c around 0 76.6%
if 5.0000000000000001e84 < (*.f64 a b) Initial program 89.6%
Taylor expanded in a around inf 82.7%
*-commutative82.7%
associate-*r*82.7%
Simplified82.7%
Final simplification75.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* a b) 5e+293) (+ (+ (* x y) (* t (* z 0.0625))) (+ c (/ a (/ -4.0 b)))) (* a (* b -0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= 5e+293) {
tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)));
} else {
tmp = a * (b * -0.25);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= 5d+293) then
tmp = ((x * y) + (t * (z * 0.0625d0))) + (c + (a / ((-4.0d0) / b)))
else
tmp = a * (b * (-0.25d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= 5e+293) {
tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)));
} else {
tmp = a * (b * -0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= 5e+293: tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b))) else: tmp = a * (b * -0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= 5e+293) tmp = Float64(Float64(Float64(x * y) + Float64(t * Float64(z * 0.0625))) + Float64(c + Float64(a / Float64(-4.0 / b)))); else tmp = Float64(a * Float64(b * -0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= 5e+293) tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b))); else tmp = a * (b * -0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], 5e+293], N[(N[(N[(x * y), $MachinePrecision] + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c + N[(a / N[(-4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\left(x \cdot y + t \cdot \left(z \cdot 0.0625\right)\right) + \left(c + \frac{a}{\frac{-4}{b}}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < 5.00000000000000033e293Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
fma-def97.9%
associate-*l/97.9%
distribute-frac-neg97.9%
distribute-rgt-neg-out97.9%
associate-/l*97.8%
neg-mul-197.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
fma-udef97.4%
*-commutative97.4%
div-inv97.4%
metadata-eval97.4%
Applied egg-rr97.4%
if 5.00000000000000033e293 < (*.f64 a b) Initial program 68.8%
sub-neg68.8%
associate-+l+68.8%
fma-def75.0%
associate-*l/75.0%
distribute-frac-neg75.0%
distribute-rgt-neg-out75.0%
associate-/l*75.0%
neg-mul-175.0%
associate-/r*75.0%
metadata-eval75.0%
Simplified75.0%
fma-udef68.8%
*-commutative68.8%
div-inv68.8%
metadata-eval68.8%
Applied egg-rr68.8%
Taylor expanded in a around inf 93.8%
associate-*r*93.8%
*-commutative93.8%
associate-*r*93.8%
Simplified93.8%
Final simplification97.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -2e+45) (not (<= (* a b) 5e+110))) (- (+ c (* x y)) (* (* a b) 0.25)) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+45) || !((a * b) <= 5e+110)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((a * b) <= (-2d+45)) .or. (.not. ((a * b) <= 5d+110))) then
tmp = (c + (x * y)) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+45) || !((a * b) <= 5e+110)) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -2e+45) or not ((a * b) <= 5e+110): tmp = (c + (x * y)) - ((a * b) * 0.25) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -2e+45) || !(Float64(a * b) <= 5e+110)) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -2e+45) || ~(((a * b) <= 5e+110))) tmp = (c + (x * y)) - ((a * b) * 0.25); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2e+45], N[Not[LessEqual[N[(a * b), $MachinePrecision], 5e+110]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+45} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+110}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e45 or 4.99999999999999978e110 < (*.f64 a b) Initial program 91.2%
Taylor expanded in z around 0 82.4%
if -1.9999999999999999e45 < (*.f64 a b) < 4.99999999999999978e110Initial program 98.2%
Taylor expanded in a around 0 92.9%
Final simplification89.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -2e+143)
(- (* x y) (* (* a b) 0.25))
(if (<= (* a b) 5e+110)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(+ c (* a (* b -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -2e+143) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a * b) <= (-2d+143)) then
tmp = (x * y) - ((a * b) * 0.25d0)
else if ((a * b) <= 5d+110) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + (a * (b * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -2e+143) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -2e+143: tmp = (x * y) - ((a * b) * 0.25) elif (a * b) <= 5e+110: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + (a * (b * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -2e+143) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); elseif (Float64(a * b) <= 5e+110) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(a * Float64(b * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -2e+143) tmp = (x * y) - ((a * b) * 0.25); elseif ((a * b) <= 5e+110) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + (a * (b * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+143], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -2e143Initial program 89.2%
Taylor expanded in z around 0 77.6%
Taylor expanded in c around 0 70.7%
if -2e143 < (*.f64 a b) < 4.99999999999999978e110Initial program 98.4%
Taylor expanded in a around 0 91.2%
if 4.99999999999999978e110 < (*.f64 a b) Initial program 88.9%
Taylor expanded in a around inf 83.8%
*-commutative83.8%
associate-*r*83.8%
Simplified83.8%
Final simplification87.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= (* a b) -1e+144)
(- t_1 (* (* a b) 0.25))
(if (<= (* a b) 5e+110) (+ c (+ (* x y) t_1)) (+ c (* a (* b -0.25)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -1e+144) {
tmp = t_1 - ((a * b) * 0.25);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
if ((a * b) <= (-1d+144)) then
tmp = t_1 - ((a * b) * 0.25d0)
else if ((a * b) <= 5d+110) then
tmp = c + ((x * y) + t_1)
else
tmp = c + (a * (b * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if ((a * b) <= -1e+144) {
tmp = t_1 - ((a * b) * 0.25);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if (a * b) <= -1e+144: tmp = t_1 - ((a * b) * 0.25) elif (a * b) <= 5e+110: tmp = c + ((x * y) + t_1) else: tmp = c + (a * (b * -0.25)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(a * b) <= -1e+144) tmp = Float64(t_1 - Float64(Float64(a * b) * 0.25)); elseif (Float64(a * b) <= 5e+110) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(c + Float64(a * Float64(b * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); tmp = 0.0; if ((a * b) <= -1e+144) tmp = t_1 - ((a * b) * 0.25); elseif ((a * b) <= 5e+110) tmp = c + ((x * y) + t_1); else tmp = c + (a * (b * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+144], N[(t$95$1 - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t_1 - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000002e144Initial program 88.8%
Taylor expanded in x around 0 80.6%
Taylor expanded in c around 0 70.8%
if -1.00000000000000002e144 < (*.f64 a b) < 4.99999999999999978e110Initial program 98.4%
Taylor expanded in a around 0 91.2%
if 4.99999999999999978e110 < (*.f64 a b) Initial program 88.9%
Taylor expanded in a around inf 83.8%
*-commutative83.8%
associate-*r*83.8%
Simplified83.8%
Final simplification87.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* a b) 0.25)))
(if (<= (* a b) -1e+144)
(+ c (- t_1 t_2))
(if (<= (* a b) 5e+110) (+ c (+ (* x y) t_1)) (- (+ c (* x y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((a * b) <= -1e+144) {
tmp = c + (t_1 - t_2);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (a * b) * 0.25d0
if ((a * b) <= (-1d+144)) then
tmp = c + (t_1 - t_2)
else if ((a * b) <= 5d+110) then
tmp = c + ((x * y) + t_1)
else
tmp = (c + (x * y)) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((a * b) <= -1e+144) {
tmp = c + (t_1 - t_2);
} else if ((a * b) <= 5e+110) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) * 0.25 tmp = 0 if (a * b) <= -1e+144: tmp = c + (t_1 - t_2) elif (a * b) <= 5e+110: tmp = c + ((x * y) + t_1) else: tmp = (c + (x * y)) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if (Float64(a * b) <= -1e+144) tmp = Float64(c + Float64(t_1 - t_2)); elseif (Float64(a * b) <= 5e+110) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(c + Float64(x * y)) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (a * b) * 0.25; tmp = 0.0; if ((a * b) <= -1e+144) tmp = c + (t_1 - t_2); elseif ((a * b) <= 5e+110) tmp = c + ((x * y) + t_1); else tmp = (c + (x * y)) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+144], N[(c + N[(t$95$1 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\
\;\;\;\;c + \left(t_1 - t_2\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000002e144Initial program 88.8%
Taylor expanded in x around 0 80.6%
if -1.00000000000000002e144 < (*.f64 a b) < 4.99999999999999978e110Initial program 98.4%
Taylor expanded in a around 0 91.2%
if 4.99999999999999978e110 < (*.f64 a b) Initial program 88.9%
Taylor expanded in z around 0 87.9%
Final simplification89.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))))
(if (<= y -2.2e-88)
(* x y)
(if (<= y -1.7e-243)
c
(if (<= y 1.12e-187)
(* z (* t 0.0625))
(if (<= y 5.8e-88)
t_1
(if (<= y 2.6e-49) c (if (<= y 8e-36) t_1 (* x y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (y <= -2.2e-88) {
tmp = x * y;
} else if (y <= -1.7e-243) {
tmp = c;
} else if (y <= 1.12e-187) {
tmp = z * (t * 0.0625);
} else if (y <= 5.8e-88) {
tmp = t_1;
} else if (y <= 2.6e-49) {
tmp = c;
} else if (y <= 8e-36) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * (b * (-0.25d0))
if (y <= (-2.2d-88)) then
tmp = x * y
else if (y <= (-1.7d-243)) then
tmp = c
else if (y <= 1.12d-187) then
tmp = z * (t * 0.0625d0)
else if (y <= 5.8d-88) then
tmp = t_1
else if (y <= 2.6d-49) then
tmp = c
else if (y <= 8d-36) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (y <= -2.2e-88) {
tmp = x * y;
} else if (y <= -1.7e-243) {
tmp = c;
} else if (y <= 1.12e-187) {
tmp = z * (t * 0.0625);
} else if (y <= 5.8e-88) {
tmp = t_1;
} else if (y <= 2.6e-49) {
tmp = c;
} else if (y <= 8e-36) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) tmp = 0 if y <= -2.2e-88: tmp = x * y elif y <= -1.7e-243: tmp = c elif y <= 1.12e-187: tmp = z * (t * 0.0625) elif y <= 5.8e-88: tmp = t_1 elif y <= 2.6e-49: tmp = c elif y <= 8e-36: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (y <= -2.2e-88) tmp = Float64(x * y); elseif (y <= -1.7e-243) tmp = c; elseif (y <= 1.12e-187) tmp = Float64(z * Float64(t * 0.0625)); elseif (y <= 5.8e-88) tmp = t_1; elseif (y <= 2.6e-49) tmp = c; elseif (y <= 8e-36) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a * (b * -0.25); tmp = 0.0; if (y <= -2.2e-88) tmp = x * y; elseif (y <= -1.7e-243) tmp = c; elseif (y <= 1.12e-187) tmp = z * (t * 0.0625); elseif (y <= 5.8e-88) tmp = t_1; elseif (y <= 2.6e-49) tmp = c; elseif (y <= 8e-36) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e-88], N[(x * y), $MachinePrecision], If[LessEqual[y, -1.7e-243], c, If[LessEqual[y, 1.12e-187], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-88], t$95$1, If[LessEqual[y, 2.6e-49], c, If[LessEqual[y, 8e-36], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{-88}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-243}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-187}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-49}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -2.20000000000000005e-88 or 7.9999999999999995e-36 < y Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
fma-def96.1%
associate-*l/96.1%
distribute-frac-neg96.1%
distribute-rgt-neg-out96.1%
associate-/l*96.1%
neg-mul-196.1%
associate-/r*96.1%
metadata-eval96.1%
Simplified96.1%
fma-udef94.5%
*-commutative94.5%
div-inv94.5%
metadata-eval94.5%
Applied egg-rr94.5%
Taylor expanded in x around inf 48.0%
if -2.20000000000000005e-88 < y < -1.69999999999999998e-243 or 5.8000000000000003e-88 < y < 2.59999999999999995e-49Initial program 98.1%
Taylor expanded in c around inf 46.6%
if -1.69999999999999998e-243 < y < 1.12e-187Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
fma-def97.8%
associate-*l/97.8%
distribute-frac-neg97.8%
distribute-rgt-neg-out97.8%
associate-/l*97.6%
neg-mul-197.6%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
fma-udef97.6%
*-commutative97.6%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Taylor expanded in t around inf 35.4%
associate-*r*35.4%
*-commutative35.4%
Simplified35.4%
if 1.12e-187 < y < 5.8000000000000003e-88 or 2.59999999999999995e-49 < y < 7.9999999999999995e-36Initial program 92.9%
sub-neg92.9%
associate-+l+92.9%
fma-def92.9%
associate-*l/92.9%
distribute-frac-neg92.9%
distribute-rgt-neg-out92.9%
associate-/l*92.8%
neg-mul-192.8%
associate-/r*92.8%
metadata-eval92.8%
Simplified92.8%
fma-udef92.8%
*-commutative92.8%
div-inv92.8%
metadata-eval92.8%
Applied egg-rr92.8%
Taylor expanded in a around inf 45.3%
associate-*r*45.3%
*-commutative45.3%
associate-*r*45.3%
Simplified45.3%
Final simplification45.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))))
(if (<= b -1.95e-57)
t_1
(if (<= b -7e-305)
(* x y)
(if (<= b 8.2e-164) c (if (<= b 3.7e+98) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (b <= -1.95e-57) {
tmp = t_1;
} else if (b <= -7e-305) {
tmp = x * y;
} else if (b <= 8.2e-164) {
tmp = c;
} else if (b <= 3.7e+98) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * (b * (-0.25d0))
if (b <= (-1.95d-57)) then
tmp = t_1
else if (b <= (-7d-305)) then
tmp = x * y
else if (b <= 8.2d-164) then
tmp = c
else if (b <= 3.7d+98) then
tmp = x * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (b <= -1.95e-57) {
tmp = t_1;
} else if (b <= -7e-305) {
tmp = x * y;
} else if (b <= 8.2e-164) {
tmp = c;
} else if (b <= 3.7e+98) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) tmp = 0 if b <= -1.95e-57: tmp = t_1 elif b <= -7e-305: tmp = x * y elif b <= 8.2e-164: tmp = c elif b <= 3.7e+98: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (b <= -1.95e-57) tmp = t_1; elseif (b <= -7e-305) tmp = Float64(x * y); elseif (b <= 8.2e-164) tmp = c; elseif (b <= 3.7e+98) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a * (b * -0.25); tmp = 0.0; if (b <= -1.95e-57) tmp = t_1; elseif (b <= -7e-305) tmp = x * y; elseif (b <= 8.2e-164) tmp = c; elseif (b <= 3.7e+98) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.95e-57], t$95$1, If[LessEqual[b, -7e-305], N[(x * y), $MachinePrecision], If[LessEqual[b, 8.2e-164], c, If[LessEqual[b, 3.7e+98], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-305}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-164}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+98}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.95000000000000003e-57 or 3.6999999999999999e98 < b Initial program 91.9%
sub-neg91.9%
associate-+l+91.9%
fma-def93.7%
associate-*l/93.7%
distribute-frac-neg93.7%
distribute-rgt-neg-out93.7%
associate-/l*93.6%
neg-mul-193.6%
associate-/r*93.6%
metadata-eval93.6%
Simplified93.6%
fma-udef91.8%
*-commutative91.8%
div-inv91.8%
metadata-eval91.8%
Applied egg-rr91.8%
Taylor expanded in a around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
associate-*r*43.7%
Simplified43.7%
if -1.95000000000000003e-57 < b < -6.9999999999999996e-305 or 8.1999999999999996e-164 < b < 3.6999999999999999e98Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
fma-def98.1%
associate-*l/98.1%
distribute-frac-neg98.1%
distribute-rgt-neg-out98.1%
associate-/l*98.1%
neg-mul-198.1%
associate-/r*98.1%
metadata-eval98.1%
Simplified98.1%
fma-udef98.1%
*-commutative98.1%
div-inv98.1%
metadata-eval98.1%
Applied egg-rr98.1%
Taylor expanded in x around inf 34.7%
if -6.9999999999999996e-305 < b < 8.1999999999999996e-164Initial program 100.0%
Taylor expanded in c around inf 38.3%
Final simplification39.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* z (* t 0.0625))))
(if (<= t -3.8e+24)
t_2
(if (<= t 4.4e-213)
t_1
(if (<= t 8.6e-175) (* a (* b -0.25)) (if (<= t 1.15e+163) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = z * (t * 0.0625);
double tmp;
if (t <= -3.8e+24) {
tmp = t_2;
} else if (t <= 4.4e-213) {
tmp = t_1;
} else if (t <= 8.6e-175) {
tmp = a * (b * -0.25);
} else if (t <= 1.15e+163) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = z * (t * 0.0625d0)
if (t <= (-3.8d+24)) then
tmp = t_2
else if (t <= 4.4d-213) then
tmp = t_1
else if (t <= 8.6d-175) then
tmp = a * (b * (-0.25d0))
else if (t <= 1.15d+163) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = z * (t * 0.0625);
double tmp;
if (t <= -3.8e+24) {
tmp = t_2;
} else if (t <= 4.4e-213) {
tmp = t_1;
} else if (t <= 8.6e-175) {
tmp = a * (b * -0.25);
} else if (t <= 1.15e+163) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = z * (t * 0.0625) tmp = 0 if t <= -3.8e+24: tmp = t_2 elif t <= 4.4e-213: tmp = t_1 elif t <= 8.6e-175: tmp = a * (b * -0.25) elif t <= 1.15e+163: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(z * Float64(t * 0.0625)) tmp = 0.0 if (t <= -3.8e+24) tmp = t_2; elseif (t <= 4.4e-213) tmp = t_1; elseif (t <= 8.6e-175) tmp = Float64(a * Float64(b * -0.25)); elseif (t <= 1.15e+163) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = z * (t * 0.0625); tmp = 0.0; if (t <= -3.8e+24) tmp = t_2; elseif (t <= 4.4e-213) tmp = t_1; elseif (t <= 8.6e-175) tmp = a * (b * -0.25); elseif (t <= 1.15e+163) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+24], t$95$2, If[LessEqual[t, 4.4e-213], t$95$1, If[LessEqual[t, 8.6e-175], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+163], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-175}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+163}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.80000000000000015e24 or 1.15000000000000001e163 < t Initial program 89.4%
sub-neg89.4%
associate-+l+89.4%
fma-def91.7%
associate-*l/91.7%
distribute-frac-neg91.7%
distribute-rgt-neg-out91.7%
associate-/l*91.7%
neg-mul-191.7%
associate-/r*91.7%
metadata-eval91.7%
Simplified91.7%
fma-udef89.3%
*-commutative89.3%
div-inv89.3%
metadata-eval89.3%
Applied egg-rr89.3%
Taylor expanded in t around inf 56.1%
associate-*r*56.1%
*-commutative56.1%
Simplified56.1%
if -3.80000000000000015e24 < t < 4.40000000000000019e-213 or 8.59999999999999996e-175 < t < 1.15000000000000001e163Initial program 98.8%
Taylor expanded in x around inf 62.7%
if 4.40000000000000019e-213 < t < 8.59999999999999996e-175Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
fma-def100.0%
associate-*l/100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
associate-/l*100.0%
neg-mul-1100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
fma-udef100.0%
*-commutative100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 26.0%
associate-*r*26.0%
*-commutative26.0%
associate-*r*26.0%
Simplified26.0%
Final simplification59.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1.75e+80) (not (<= (* x y) 7.5e+118))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.75e+80) || !((x * y) <= 7.5e+118)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-1.75d+80)) .or. (.not. ((x * y) <= 7.5d+118))) then
tmp = x * y
else
tmp = c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.75e+80) || !((x * y) <= 7.5e+118)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1.75e+80) or not ((x * y) <= 7.5e+118): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1.75e+80) || !(Float64(x * y) <= 7.5e+118)) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -1.75e+80) || ~(((x * y) <= 7.5e+118))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.75e+80], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7.5e+118]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.75 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 7.5 \cdot 10^{+118}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -1.74999999999999997e80 or 7.50000000000000003e118 < (*.f64 x y) Initial program 91.1%
sub-neg91.1%
associate-+l+91.1%
fma-def93.6%
associate-*l/93.6%
distribute-frac-neg93.6%
distribute-rgt-neg-out93.6%
associate-/l*93.7%
neg-mul-193.7%
associate-/r*93.7%
metadata-eval93.7%
Simplified93.7%
fma-udef91.1%
*-commutative91.1%
div-inv91.1%
metadata-eval91.1%
Applied egg-rr91.1%
Taylor expanded in x around inf 72.0%
if -1.74999999999999997e80 < (*.f64 x y) < 7.50000000000000003e118Initial program 97.7%
Taylor expanded in c around inf 30.0%
Final simplification42.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.3e+51) (not (<= z 38000000.0))) (+ c (* 0.0625 (* z t))) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.3e+51) || !(z <= 38000000.0)) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.3d+51)) .or. (.not. (z <= 38000000.0d0))) then
tmp = c + (0.0625d0 * (z * t))
else
tmp = c + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.3e+51) || !(z <= 38000000.0)) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.3e+51) or not (z <= 38000000.0): tmp = c + (0.0625 * (z * t)) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.3e+51) || !(z <= 38000000.0)) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -1.3e+51) || ~((z <= 38000000.0))) tmp = c + (0.0625 * (z * t)); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.3e+51], N[Not[LessEqual[z, 38000000.0]], $MachinePrecision]], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+51} \lor \neg \left(z \leq 38000000\right):\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if z < -1.3000000000000001e51 or 3.8e7 < z Initial program 91.9%
Taylor expanded in z around inf 61.9%
if -1.3000000000000001e51 < z < 3.8e7Initial program 98.6%
Taylor expanded in x around inf 64.7%
Final simplification63.5%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 95.7%
Taylor expanded in c around inf 24.0%
Final simplification24.0%
herbie shell --seed 2023308
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))