
(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 13 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 (+ (fma x y (fma 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 fma(x, y, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 98.4%
associate--l+98.4%
fma-define98.8%
associate-/l*98.8%
fma-neg98.8%
distribute-neg-frac298.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 98.4%
associate-+l-98.4%
*-commutative98.4%
associate-+l-98.4%
fma-define98.8%
*-commutative98.8%
associate-/l*98.8%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* z (* t 0.0625))))
(t_2 (* (* a b) 0.25))
(t_3 (- (* 0.0625 (* z t)) t_2))
(t_4 (+ c (* x y))))
(if (<= (* x y) -1.85e+146)
t_4
(if (<= (* x y) -6.1e-164)
t_3
(if (<= (* x y) -1e-316)
t_1
(if (<= (* x y) 6.2e-49)
t_3
(if (<= (* x y) 17000.0)
t_1
(if (<= (* x y) 2.6e+32)
(- (* x y) t_2)
(if (<= (* x y) 1e+67)
(+ c (* b (* a -0.25)))
(if (<= (* x y) 4e+114) t_1 t_4))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (z * (t * 0.0625));
double t_2 = (a * b) * 0.25;
double t_3 = (0.0625 * (z * t)) - t_2;
double t_4 = c + (x * y);
double tmp;
if ((x * y) <= -1.85e+146) {
tmp = t_4;
} else if ((x * y) <= -6.1e-164) {
tmp = t_3;
} else if ((x * y) <= -1e-316) {
tmp = t_1;
} else if ((x * y) <= 6.2e-49) {
tmp = t_3;
} else if ((x * y) <= 17000.0) {
tmp = t_1;
} else if ((x * y) <= 2.6e+32) {
tmp = (x * y) - t_2;
} else if ((x * y) <= 1e+67) {
tmp = c + (b * (a * -0.25));
} else if ((x * y) <= 4e+114) {
tmp = t_1;
} else {
tmp = t_4;
}
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 + (z * (t * 0.0625d0))
t_2 = (a * b) * 0.25d0
t_3 = (0.0625d0 * (z * t)) - t_2
t_4 = c + (x * y)
if ((x * y) <= (-1.85d+146)) then
tmp = t_4
else if ((x * y) <= (-6.1d-164)) then
tmp = t_3
else if ((x * y) <= (-1d-316)) then
tmp = t_1
else if ((x * y) <= 6.2d-49) then
tmp = t_3
else if ((x * y) <= 17000.0d0) then
tmp = t_1
else if ((x * y) <= 2.6d+32) then
tmp = (x * y) - t_2
else if ((x * y) <= 1d+67) then
tmp = c + (b * (a * (-0.25d0)))
else if ((x * y) <= 4d+114) then
tmp = t_1
else
tmp = t_4
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 + (z * (t * 0.0625));
double t_2 = (a * b) * 0.25;
double t_3 = (0.0625 * (z * t)) - t_2;
double t_4 = c + (x * y);
double tmp;
if ((x * y) <= -1.85e+146) {
tmp = t_4;
} else if ((x * y) <= -6.1e-164) {
tmp = t_3;
} else if ((x * y) <= -1e-316) {
tmp = t_1;
} else if ((x * y) <= 6.2e-49) {
tmp = t_3;
} else if ((x * y) <= 17000.0) {
tmp = t_1;
} else if ((x * y) <= 2.6e+32) {
tmp = (x * y) - t_2;
} else if ((x * y) <= 1e+67) {
tmp = c + (b * (a * -0.25));
} else if ((x * y) <= 4e+114) {
tmp = t_1;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (z * (t * 0.0625)) t_2 = (a * b) * 0.25 t_3 = (0.0625 * (z * t)) - t_2 t_4 = c + (x * y) tmp = 0 if (x * y) <= -1.85e+146: tmp = t_4 elif (x * y) <= -6.1e-164: tmp = t_3 elif (x * y) <= -1e-316: tmp = t_1 elif (x * y) <= 6.2e-49: tmp = t_3 elif (x * y) <= 17000.0: tmp = t_1 elif (x * y) <= 2.6e+32: tmp = (x * y) - t_2 elif (x * y) <= 1e+67: tmp = c + (b * (a * -0.25)) elif (x * y) <= 4e+114: tmp = t_1 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(z * Float64(t * 0.0625))) t_2 = Float64(Float64(a * b) * 0.25) t_3 = Float64(Float64(0.0625 * Float64(z * t)) - t_2) t_4 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.85e+146) tmp = t_4; elseif (Float64(x * y) <= -6.1e-164) tmp = t_3; elseif (Float64(x * y) <= -1e-316) tmp = t_1; elseif (Float64(x * y) <= 6.2e-49) tmp = t_3; elseif (Float64(x * y) <= 17000.0) tmp = t_1; elseif (Float64(x * y) <= 2.6e+32) tmp = Float64(Float64(x * y) - t_2); elseif (Float64(x * y) <= 1e+67) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (Float64(x * y) <= 4e+114) tmp = t_1; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (z * (t * 0.0625)); t_2 = (a * b) * 0.25; t_3 = (0.0625 * (z * t)) - t_2; t_4 = c + (x * y); tmp = 0.0; if ((x * y) <= -1.85e+146) tmp = t_4; elseif ((x * y) <= -6.1e-164) tmp = t_3; elseif ((x * y) <= -1e-316) tmp = t_1; elseif ((x * y) <= 6.2e-49) tmp = t_3; elseif ((x * y) <= 17000.0) tmp = t_1; elseif ((x * y) <= 2.6e+32) tmp = (x * y) - t_2; elseif ((x * y) <= 1e+67) tmp = c + (b * (a * -0.25)); elseif ((x * y) <= 4e+114) tmp = t_1; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.85e+146], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], -6.1e-164], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -1e-316], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 6.2e-49], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 17000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.6e+32], N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+67], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+114], t$95$1, t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + z \cdot \left(t \cdot 0.0625\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
t_3 := 0.0625 \cdot \left(z \cdot t\right) - t\_2\\
t_4 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -1.85 \cdot 10^{+146}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \cdot y \leq -6.1 \cdot 10^{-164}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-316}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-49}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 17000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{+32}:\\
\;\;\;\;x \cdot y - t\_2\\
\mathbf{elif}\;x \cdot y \leq 10^{+67}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (*.f64 x y) < -1.85000000000000002e146 or 4e114 < (*.f64 x y) Initial program 96.9%
Taylor expanded in x around inf 86.9%
if -1.85000000000000002e146 < (*.f64 x y) < -6.10000000000000013e-164 or -9.999999837e-317 < (*.f64 x y) < 6.2e-49Initial program 100.0%
Taylor expanded in x around 0 95.5%
Taylor expanded in c around 0 73.5%
if -6.10000000000000013e-164 < (*.f64 x y) < -9.999999837e-317 or 6.2e-49 < (*.f64 x y) < 17000 or 9.99999999999999983e66 < (*.f64 x y) < 4e114Initial program 97.5%
Taylor expanded in z around inf 85.6%
*-commutative85.6%
*-commutative85.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
if 17000 < (*.f64 x y) < 2.6000000000000002e32Initial program 100.0%
Taylor expanded in z around 0 84.7%
Taylor expanded in c around 0 84.7%
if 2.6000000000000002e32 < (*.f64 x y) < 9.99999999999999983e66Initial program 100.0%
Taylor expanded in a around inf 99.6%
associate-*r*99.6%
Simplified99.6%
Final simplification81.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))) (t_2 (* 0.0625 (* z t))))
(if (<= (* x y) -2.6e+145)
(* x y)
(if (<= (* x y) -3.1e-164)
t_1
(if (<= (* x y) -1e-316)
c
(if (<= (* x y) 7.6e-169)
t_1
(if (<= (* x y) 5.3e-15)
t_2
(if (<= (* x y) 9.5e+66)
t_1
(if (<= (* x y) 4.1e+123) t_2 (* 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 t_2 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -2.6e+145) {
tmp = x * y;
} else if ((x * y) <= -3.1e-164) {
tmp = t_1;
} else if ((x * y) <= -1e-316) {
tmp = c;
} else if ((x * y) <= 7.6e-169) {
tmp = t_1;
} else if ((x * y) <= 5.3e-15) {
tmp = t_2;
} else if ((x * y) <= 9.5e+66) {
tmp = t_1;
} else if ((x * y) <= 4.1e+123) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * (b * (-0.25d0))
t_2 = 0.0625d0 * (z * t)
if ((x * y) <= (-2.6d+145)) then
tmp = x * y
else if ((x * y) <= (-3.1d-164)) then
tmp = t_1
else if ((x * y) <= (-1d-316)) then
tmp = c
else if ((x * y) <= 7.6d-169) then
tmp = t_1
else if ((x * y) <= 5.3d-15) then
tmp = t_2
else if ((x * y) <= 9.5d+66) then
tmp = t_1
else if ((x * y) <= 4.1d+123) then
tmp = t_2
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 t_2 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -2.6e+145) {
tmp = x * y;
} else if ((x * y) <= -3.1e-164) {
tmp = t_1;
} else if ((x * y) <= -1e-316) {
tmp = c;
} else if ((x * y) <= 7.6e-169) {
tmp = t_1;
} else if ((x * y) <= 5.3e-15) {
tmp = t_2;
} else if ((x * y) <= 9.5e+66) {
tmp = t_1;
} else if ((x * y) <= 4.1e+123) {
tmp = t_2;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) t_2 = 0.0625 * (z * t) tmp = 0 if (x * y) <= -2.6e+145: tmp = x * y elif (x * y) <= -3.1e-164: tmp = t_1 elif (x * y) <= -1e-316: tmp = c elif (x * y) <= 7.6e-169: tmp = t_1 elif (x * y) <= 5.3e-15: tmp = t_2 elif (x * y) <= 9.5e+66: tmp = t_1 elif (x * y) <= 4.1e+123: tmp = t_2 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -2.6e+145) tmp = Float64(x * y); elseif (Float64(x * y) <= -3.1e-164) tmp = t_1; elseif (Float64(x * y) <= -1e-316) tmp = c; elseif (Float64(x * y) <= 7.6e-169) tmp = t_1; elseif (Float64(x * y) <= 5.3e-15) tmp = t_2; elseif (Float64(x * y) <= 9.5e+66) tmp = t_1; elseif (Float64(x * y) <= 4.1e+123) tmp = t_2; 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); t_2 = 0.0625 * (z * t); tmp = 0.0; if ((x * y) <= -2.6e+145) tmp = x * y; elseif ((x * y) <= -3.1e-164) tmp = t_1; elseif ((x * y) <= -1e-316) tmp = c; elseif ((x * y) <= 7.6e-169) tmp = t_1; elseif ((x * y) <= 5.3e-15) tmp = t_2; elseif ((x * y) <= 9.5e+66) tmp = t_1; elseif ((x * y) <= 4.1e+123) tmp = t_2; 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]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.6e+145], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -3.1e-164], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-316], c, If[LessEqual[N[(x * y), $MachinePrecision], 7.6e-169], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.3e-15], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 9.5e+66], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.1e+123], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+145}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -3.1 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-316}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 7.6 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5.3 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 9.5 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.1 \cdot 10^{+123}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.60000000000000003e145 or 4.09999999999999989e123 < (*.f64 x y) Initial program 96.9%
Taylor expanded in z around 0 90.7%
fma-neg90.7%
distribute-lft-neg-in90.7%
metadata-eval90.7%
associate-*r*90.7%
Simplified90.7%
+-commutative90.7%
fma-undefine90.7%
associate-+r+90.7%
*-commutative90.7%
associate-*r*90.7%
*-commutative90.7%
+-commutative90.7%
*-commutative90.7%
fma-define91.7%
*-commutative91.7%
+-commutative91.7%
fma-undefine91.7%
Applied egg-rr91.7%
Taylor expanded in x around inf 78.6%
if -2.60000000000000003e145 < (*.f64 x y) < -3.1000000000000001e-164 or -9.999999837e-317 < (*.f64 x y) < 7.6000000000000001e-169 or 5.3000000000000001e-15 < (*.f64 x y) < 9.50000000000000051e66Initial program 100.0%
Taylor expanded in z around 0 75.4%
fma-neg75.4%
distribute-lft-neg-in75.4%
metadata-eval75.4%
associate-*r*75.4%
Simplified75.4%
+-commutative75.4%
fma-undefine75.4%
associate-+r+75.4%
*-commutative75.4%
associate-*r*75.4%
*-commutative75.4%
+-commutative75.4%
*-commutative75.4%
fma-define75.4%
*-commutative75.4%
+-commutative75.4%
fma-undefine75.4%
Applied egg-rr75.4%
Taylor expanded in b around inf 43.5%
*-commutative43.5%
associate-*r*43.5%
*-commutative43.5%
Simplified43.5%
if -3.1000000000000001e-164 < (*.f64 x y) < -9.999999837e-317Initial program 99.9%
Taylor expanded in c around inf 51.4%
if 7.6000000000000001e-169 < (*.f64 x y) < 5.3000000000000001e-15 or 9.50000000000000051e66 < (*.f64 x y) < 4.09999999999999989e123Initial program 96.4%
Taylor expanded in z around inf 84.5%
*-commutative84.5%
*-commutative84.5%
associate-*r*84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in z around inf 61.2%
Final simplification59.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= (* x y) -1.45e+135)
(* x y)
(if (<= (* x y) -1.9e-81)
t_1
(if (<= (* x y) -1e-316)
c
(if (<= (* x y) 5.2e-30)
t_1
(if (<= (* x y) 1.05e+64)
c
(if (<= (* x y) 5.8e+123) t_1 (* x y)))))))))
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 ((x * y) <= -1.45e+135) {
tmp = x * y;
} else if ((x * y) <= -1.9e-81) {
tmp = t_1;
} else if ((x * y) <= -1e-316) {
tmp = c;
} else if ((x * y) <= 5.2e-30) {
tmp = t_1;
} else if ((x * y) <= 1.05e+64) {
tmp = c;
} else if ((x * y) <= 5.8e+123) {
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 = 0.0625d0 * (z * t)
if ((x * y) <= (-1.45d+135)) then
tmp = x * y
else if ((x * y) <= (-1.9d-81)) then
tmp = t_1
else if ((x * y) <= (-1d-316)) then
tmp = c
else if ((x * y) <= 5.2d-30) then
tmp = t_1
else if ((x * y) <= 1.05d+64) then
tmp = c
else if ((x * y) <= 5.8d+123) 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 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -1.45e+135) {
tmp = x * y;
} else if ((x * y) <= -1.9e-81) {
tmp = t_1;
} else if ((x * y) <= -1e-316) {
tmp = c;
} else if ((x * y) <= 5.2e-30) {
tmp = t_1;
} else if ((x * y) <= 1.05e+64) {
tmp = c;
} else if ((x * y) <= 5.8e+123) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if (x * y) <= -1.45e+135: tmp = x * y elif (x * y) <= -1.9e-81: tmp = t_1 elif (x * y) <= -1e-316: tmp = c elif (x * y) <= 5.2e-30: tmp = t_1 elif (x * y) <= 1.05e+64: tmp = c elif (x * y) <= 5.8e+123: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -1.45e+135) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.9e-81) tmp = t_1; elseif (Float64(x * y) <= -1e-316) tmp = c; elseif (Float64(x * y) <= 5.2e-30) tmp = t_1; elseif (Float64(x * y) <= 1.05e+64) tmp = c; elseif (Float64(x * y) <= 5.8e+123) 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 = 0.0625 * (z * t); tmp = 0.0; if ((x * y) <= -1.45e+135) tmp = x * y; elseif ((x * y) <= -1.9e-81) tmp = t_1; elseif ((x * y) <= -1e-316) tmp = c; elseif ((x * y) <= 5.2e-30) tmp = t_1; elseif ((x * y) <= 1.05e+64) tmp = c; elseif ((x * y) <= 5.8e+123) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.45e+135], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.9e-81], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-316], c, If[LessEqual[N[(x * y), $MachinePrecision], 5.2e-30], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.05e+64], c, If[LessEqual[N[(x * y), $MachinePrecision], 5.8e+123], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -1.45 \cdot 10^{+135}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.9 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-316}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 5.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.05 \cdot 10^{+64}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 5.8 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.4499999999999999e135 or 5.80000000000000019e123 < (*.f64 x y) Initial program 96.9%
Taylor expanded in z around 0 90.9%
fma-neg90.9%
distribute-lft-neg-in90.9%
metadata-eval90.9%
associate-*r*90.9%
Simplified90.9%
+-commutative90.9%
fma-undefine90.9%
associate-+r+90.9%
*-commutative90.9%
associate-*r*90.9%
*-commutative90.9%
+-commutative90.9%
*-commutative90.9%
fma-define91.9%
*-commutative91.9%
+-commutative91.9%
fma-undefine91.9%
Applied egg-rr91.9%
Taylor expanded in x around inf 77.1%
if -1.4499999999999999e135 < (*.f64 x y) < -1.8999999999999999e-81 or -9.999999837e-317 < (*.f64 x y) < 5.19999999999999973e-30 or 1.05e64 < (*.f64 x y) < 5.80000000000000019e123Initial program 99.0%
Taylor expanded in z around inf 60.6%
*-commutative60.6%
*-commutative60.6%
associate-*r*60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in z around inf 40.1%
if -1.8999999999999999e-81 < (*.f64 x y) < -9.999999837e-317 or 5.19999999999999973e-30 < (*.f64 x y) < 1.05e64Initial program 99.9%
Taylor expanded in c around inf 43.7%
Final simplification55.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* a -0.25))))
(t_2 (+ c (* z (* t 0.0625))))
(t_3 (+ c (* x y))))
(if (<= (* x y) -1.95e+145)
t_3
(if (<= (* x y) 1.52e-171)
t_1
(if (<= (* x y) 2300000000000.0)
t_2
(if (<= (* x y) 1e+67) t_1 (if (<= (* x y) 1.3e+120) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (a * -0.25));
double t_2 = c + (z * (t * 0.0625));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -1.95e+145) {
tmp = t_3;
} else if ((x * y) <= 1.52e-171) {
tmp = t_1;
} else if ((x * y) <= 2300000000000.0) {
tmp = t_2;
} else if ((x * y) <= 1e+67) {
tmp = t_1;
} else if ((x * y) <= 1.3e+120) {
tmp = t_2;
} else {
tmp = t_3;
}
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 + (b * (a * (-0.25d0)))
t_2 = c + (z * (t * 0.0625d0))
t_3 = c + (x * y)
if ((x * y) <= (-1.95d+145)) then
tmp = t_3
else if ((x * y) <= 1.52d-171) then
tmp = t_1
else if ((x * y) <= 2300000000000.0d0) then
tmp = t_2
else if ((x * y) <= 1d+67) then
tmp = t_1
else if ((x * y) <= 1.3d+120) then
tmp = t_2
else
tmp = t_3
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 + (b * (a * -0.25));
double t_2 = c + (z * (t * 0.0625));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -1.95e+145) {
tmp = t_3;
} else if ((x * y) <= 1.52e-171) {
tmp = t_1;
} else if ((x * y) <= 2300000000000.0) {
tmp = t_2;
} else if ((x * y) <= 1e+67) {
tmp = t_1;
} else if ((x * y) <= 1.3e+120) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (a * -0.25)) t_2 = c + (z * (t * 0.0625)) t_3 = c + (x * y) tmp = 0 if (x * y) <= -1.95e+145: tmp = t_3 elif (x * y) <= 1.52e-171: tmp = t_1 elif (x * y) <= 2300000000000.0: tmp = t_2 elif (x * y) <= 1e+67: tmp = t_1 elif (x * y) <= 1.3e+120: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(a * -0.25))) t_2 = Float64(c + Float64(z * Float64(t * 0.0625))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.95e+145) tmp = t_3; elseif (Float64(x * y) <= 1.52e-171) tmp = t_1; elseif (Float64(x * y) <= 2300000000000.0) tmp = t_2; elseif (Float64(x * y) <= 1e+67) tmp = t_1; elseif (Float64(x * y) <= 1.3e+120) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (b * (a * -0.25)); t_2 = c + (z * (t * 0.0625)); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -1.95e+145) tmp = t_3; elseif ((x * y) <= 1.52e-171) tmp = t_1; elseif ((x * y) <= 2300000000000.0) tmp = t_2; elseif ((x * y) <= 1e+67) tmp = t_1; elseif ((x * y) <= 1.3e+120) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.95e+145], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1.52e-171], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2300000000000.0], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1e+67], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.3e+120], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(a \cdot -0.25\right)\\
t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -1.95 \cdot 10^{+145}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 1.52 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2300000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.3 \cdot 10^{+120}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9499999999999999e145 or 1.2999999999999999e120 < (*.f64 x y) Initial program 96.9%
Taylor expanded in x around inf 86.9%
if -1.9499999999999999e145 < (*.f64 x y) < 1.51999999999999995e-171 or 2.3e12 < (*.f64 x y) < 9.99999999999999983e66Initial program 100.0%
Taylor expanded in a around inf 68.9%
associate-*r*68.9%
Simplified68.9%
if 1.51999999999999995e-171 < (*.f64 x y) < 2.3e12 or 9.99999999999999983e66 < (*.f64 x y) < 1.2999999999999999e120Initial program 97.1%
Taylor expanded in z around inf 77.8%
*-commutative77.8%
*-commutative77.8%
associate-*r*77.8%
*-commutative77.8%
Simplified77.8%
Final simplification76.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)))
(if (or (<= (* x y) -2.6e+145) (not (<= (* x y) 7.5e+118)))
(- (+ c (* x y)) t_1)
(- (+ c (* 0.0625 (* z t))) 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 (((x * y) <= -2.6e+145) || !((x * y) <= 7.5e+118)) {
tmp = (c + (x * y)) - t_1;
} else {
tmp = (c + (0.0625 * (z * t))) - 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 (((x * y) <= (-2.6d+145)) .or. (.not. ((x * y) <= 7.5d+118))) then
tmp = (c + (x * y)) - t_1
else
tmp = (c + (0.0625d0 * (z * t))) - 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 (((x * y) <= -2.6e+145) || !((x * y) <= 7.5e+118)) {
tmp = (c + (x * y)) - t_1;
} else {
tmp = (c + (0.0625 * (z * t))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 tmp = 0 if ((x * y) <= -2.6e+145) or not ((x * y) <= 7.5e+118): tmp = (c + (x * y)) - t_1 else: tmp = (c + (0.0625 * (z * t))) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if ((Float64(x * y) <= -2.6e+145) || !(Float64(x * y) <= 7.5e+118)) tmp = Float64(Float64(c + Float64(x * y)) - t_1); else tmp = Float64(Float64(c + Float64(0.0625 * Float64(z * t))) - 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 (((x * y) <= -2.6e+145) || ~(((x * y) <= 7.5e+118))) tmp = (c + (x * y)) - t_1; else tmp = (c + (0.0625 * (z * t))) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[Or[LessEqual[N[(x * y), $MachinePrecision], -2.6e+145], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7.5e+118]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+145} \lor \neg \left(x \cdot y \leq 7.5 \cdot 10^{+118}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(c + 0.0625 \cdot \left(z \cdot t\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -2.60000000000000003e145 or 7.50000000000000003e118 < (*.f64 x y) Initial program 96.9%
Taylor expanded in z around 0 90.8%
if -2.60000000000000003e145 < (*.f64 x y) < 7.50000000000000003e118Initial program 99.3%
Taylor expanded in x around 0 94.2%
Final simplification92.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))))
(if (<= t -6.4e+38)
t_2
(if (<= t 6.5e-270)
t_1
(if (<= t 1.5e-234) (* a (* b -0.25)) (if (<= t 5e+154) 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 = 0.0625 * (z * t);
double tmp;
if (t <= -6.4e+38) {
tmp = t_2;
} else if (t <= 6.5e-270) {
tmp = t_1;
} else if (t <= 1.5e-234) {
tmp = a * (b * -0.25);
} else if (t <= 5e+154) {
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 = 0.0625d0 * (z * t)
if (t <= (-6.4d+38)) then
tmp = t_2
else if (t <= 6.5d-270) then
tmp = t_1
else if (t <= 1.5d-234) then
tmp = a * (b * (-0.25d0))
else if (t <= 5d+154) 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 = 0.0625 * (z * t);
double tmp;
if (t <= -6.4e+38) {
tmp = t_2;
} else if (t <= 6.5e-270) {
tmp = t_1;
} else if (t <= 1.5e-234) {
tmp = a * (b * -0.25);
} else if (t <= 5e+154) {
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 = 0.0625 * (z * t) tmp = 0 if t <= -6.4e+38: tmp = t_2 elif t <= 6.5e-270: tmp = t_1 elif t <= 1.5e-234: tmp = a * (b * -0.25) elif t <= 5e+154: 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(0.0625 * Float64(z * t)) tmp = 0.0 if (t <= -6.4e+38) tmp = t_2; elseif (t <= 6.5e-270) tmp = t_1; elseif (t <= 1.5e-234) tmp = Float64(a * Float64(b * -0.25)); elseif (t <= 5e+154) 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 = 0.0625 * (z * t); tmp = 0.0; if (t <= -6.4e+38) tmp = t_2; elseif (t <= 6.5e-270) tmp = t_1; elseif (t <= 1.5e-234) tmp = a * (b * -0.25); elseif (t <= 5e+154) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+38], t$95$2, If[LessEqual[t, 6.5e-270], t$95$1, If[LessEqual[t, 1.5e-234], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+154], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-270}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-234}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -6.3999999999999997e38 or 5.00000000000000004e154 < t Initial program 97.6%
Taylor expanded in z around inf 64.6%
*-commutative64.6%
*-commutative64.6%
associate-*r*64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in z around inf 53.3%
if -6.3999999999999997e38 < t < 6.5000000000000001e-270 or 1.49999999999999994e-234 < t < 5.00000000000000004e154Initial program 98.8%
Taylor expanded in x around inf 60.4%
if 6.5000000000000001e-270 < t < 1.49999999999999994e-234Initial program 100.0%
Taylor expanded in z around 0 94.1%
fma-neg94.1%
distribute-lft-neg-in94.1%
metadata-eval94.1%
associate-*r*94.1%
Simplified94.1%
+-commutative94.1%
fma-undefine94.1%
associate-+r+94.1%
*-commutative94.1%
associate-*r*94.1%
*-commutative94.1%
+-commutative94.1%
*-commutative94.1%
fma-define94.1%
*-commutative94.1%
+-commutative94.1%
fma-undefine94.1%
Applied egg-rr94.1%
Taylor expanded in b around inf 65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Final simplification58.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1.45e+135) (not (<= (* x y) 4.8e+117))) (+ c (* x y)) (+ c (* z (* t 0.0625)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1.45e+135) || !((x * y) <= 4.8e+117)) {
tmp = c + (x * y);
} else {
tmp = c + (z * (t * 0.0625));
}
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.45d+135)) .or. (.not. ((x * y) <= 4.8d+117))) then
tmp = c + (x * y)
else
tmp = c + (z * (t * 0.0625d0))
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.45e+135) || !((x * y) <= 4.8e+117)) {
tmp = c + (x * y);
} else {
tmp = c + (z * (t * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1.45e+135) or not ((x * y) <= 4.8e+117): tmp = c + (x * y) else: tmp = c + (z * (t * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1.45e+135) || !(Float64(x * y) <= 4.8e+117)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(z * Float64(t * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -1.45e+135) || ~(((x * y) <= 4.8e+117))) tmp = c + (x * y); else tmp = c + (z * (t * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.45e+135], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4.8e+117]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.45 \cdot 10^{+135} \lor \neg \left(x \cdot y \leq 4.8 \cdot 10^{+117}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.4499999999999999e135 or 4.7999999999999998e117 < (*.f64 x y) Initial program 97.0%
Taylor expanded in x around inf 85.2%
if -1.4499999999999999e135 < (*.f64 x y) < 4.7999999999999998e117Initial program 99.3%
Taylor expanded in z around inf 61.8%
*-commutative61.8%
*-commutative61.8%
associate-*r*61.8%
*-commutative61.8%
Simplified61.8%
Final simplification70.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -6.4e+38)
(* 0.0625 (* z t))
(if (<= t 1.95e+174)
(- (+ c (* x y)) (* (* a b) 0.25))
(+ c (* z (* t 0.0625))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6.4e+38) {
tmp = 0.0625 * (z * t);
} else if (t <= 1.95e+174) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + (z * (t * 0.0625));
}
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 (t <= (-6.4d+38)) then
tmp = 0.0625d0 * (z * t)
else if (t <= 1.95d+174) then
tmp = (c + (x * y)) - ((a * b) * 0.25d0)
else
tmp = c + (z * (t * 0.0625d0))
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 (t <= -6.4e+38) {
tmp = 0.0625 * (z * t);
} else if (t <= 1.95e+174) {
tmp = (c + (x * y)) - ((a * b) * 0.25);
} else {
tmp = c + (z * (t * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -6.4e+38: tmp = 0.0625 * (z * t) elif t <= 1.95e+174: tmp = (c + (x * y)) - ((a * b) * 0.25) else: tmp = c + (z * (t * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -6.4e+38) tmp = Float64(0.0625 * Float64(z * t)); elseif (t <= 1.95e+174) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(z * Float64(t * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -6.4e+38) tmp = 0.0625 * (z * t); elseif (t <= 1.95e+174) tmp = (c + (x * y)) - ((a * b) * 0.25); else tmp = c + (z * (t * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -6.4e+38], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+174], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+38}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+174}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\
\end{array}
\end{array}
if t < -6.3999999999999997e38Initial program 100.0%
Taylor expanded in z around inf 57.8%
*-commutative57.8%
*-commutative57.8%
associate-*r*57.8%
*-commutative57.8%
Simplified57.8%
Taylor expanded in z around inf 43.3%
if -6.3999999999999997e38 < t < 1.9499999999999999e174Initial program 98.9%
Taylor expanded in z around 0 87.3%
if 1.9499999999999999e174 < t Initial program 91.3%
Taylor expanded in z around inf 87.3%
*-commutative87.3%
*-commutative87.3%
associate-*r*87.3%
*-commutative87.3%
Simplified87.3%
Final simplification77.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -3.7e+90) (not (<= (* x y) 1.28e+138))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.7e+90) || !((x * y) <= 1.28e+138)) {
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) <= (-3.7d+90)) .or. (.not. ((x * y) <= 1.28d+138))) 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) <= -3.7e+90) || !((x * y) <= 1.28e+138)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -3.7e+90) or not ((x * y) <= 1.28e+138): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -3.7e+90) || !(Float64(x * y) <= 1.28e+138)) 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) <= -3.7e+90) || ~(((x * y) <= 1.28e+138))) 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], -3.7e+90], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.28e+138]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.7 \cdot 10^{+90} \lor \neg \left(x \cdot y \leq 1.28 \cdot 10^{+138}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -3.7e90 or 1.28000000000000008e138 < (*.f64 x y) Initial program 97.2%
Taylor expanded in z around 0 89.6%
fma-neg89.6%
distribute-lft-neg-in89.6%
metadata-eval89.6%
associate-*r*89.6%
Simplified89.6%
+-commutative89.6%
fma-undefine89.6%
associate-+r+89.6%
*-commutative89.6%
associate-*r*89.6%
*-commutative89.6%
+-commutative89.6%
*-commutative89.6%
fma-define90.5%
*-commutative90.5%
+-commutative90.5%
fma-undefine90.5%
Applied egg-rr90.5%
Taylor expanded in x around inf 72.4%
if -3.7e90 < (*.f64 x y) < 1.28000000000000008e138Initial program 99.3%
Taylor expanded in c around inf 30.0%
Final simplification47.6%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
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 + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
Initial program 98.4%
Final simplification98.4%
(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 98.4%
Taylor expanded in c around inf 21.6%
Final simplification21.6%
herbie shell --seed 2024046
(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))