
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b))))
(if (<= t_1 (- INFINITY))
(+ (fma y z x) (+ (* z (* a b)) (* t a)))
(if (<= t_1 INFINITY) t_1 (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(y, z, x) + ((z * (a * b)) + (t * a));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(y, z, x) + Float64(Float64(z * Float64(a * b)) + Float64(t * a))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z + x), $MachinePrecision] + N[(N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + \left(z \cdot \left(a \cdot b\right) + t \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < -inf.0Initial program 86.9%
associate-+l+86.9%
+-commutative86.9%
fma-define86.9%
associate-*l*97.7%
*-commutative97.7%
*-commutative97.7%
distribute-rgt-out97.7%
remove-double-neg97.7%
*-commutative97.7%
distribute-lft-neg-out97.7%
sub-neg97.7%
sub-neg97.7%
distribute-lft-neg-in97.7%
remove-double-neg97.7%
Simplified97.7%
+-commutative97.7%
distribute-rgt-in97.7%
*-commutative97.7%
associate-*r*86.9%
*-commutative86.9%
associate-*l*100.0%
Applied egg-rr100.0%
if -inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 99.5%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*10.0%
Simplified10.0%
Taylor expanded in z around inf 90.0%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b))))
(if (<= t_1 (- INFINITY))
(+ (* y z) (+ (* z (* a b)) (* t a)))
(if (<= t_1 INFINITY) t_1 (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) + ((z * (a * b)) + (t * a));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) + ((z * (a * b)) + (t * a));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= -math.inf: tmp = (y * z) + ((z * (a * b)) + (t * a)) elif t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) + Float64(Float64(z * Float64(a * b)) + Float64(t * a))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * z) + ((z * (a * b)) + (t * a)); elseif (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] + N[(N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot z + \left(z \cdot \left(a \cdot b\right) + t \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < -inf.0Initial program 86.9%
associate-+l+86.9%
+-commutative86.9%
fma-define86.9%
associate-*l*97.7%
*-commutative97.7%
*-commutative97.7%
distribute-rgt-out97.7%
remove-double-neg97.7%
*-commutative97.7%
distribute-lft-neg-out97.7%
sub-neg97.7%
sub-neg97.7%
distribute-lft-neg-in97.7%
remove-double-neg97.7%
Simplified97.7%
+-commutative97.7%
distribute-rgt-in97.7%
*-commutative97.7%
associate-*r*86.9%
*-commutative86.9%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 97.7%
*-commutative97.7%
Simplified97.7%
if -inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 99.5%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*10.0%
Simplified10.0%
Taylor expanded in z around inf 90.0%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.1e+84)
x
(if (<= x -65.0)
(* t a)
(if (<= x 4.1e-305) (* y z) (if (<= x 8.6e+127) (* t a) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.1e+84) {
tmp = x;
} else if (x <= -65.0) {
tmp = t * a;
} else if (x <= 4.1e-305) {
tmp = y * z;
} else if (x <= 8.6e+127) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (x <= (-1.1d+84)) then
tmp = x
else if (x <= (-65.0d0)) then
tmp = t * a
else if (x <= 4.1d-305) then
tmp = y * z
else if (x <= 8.6d+127) then
tmp = t * a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.1e+84) {
tmp = x;
} else if (x <= -65.0) {
tmp = t * a;
} else if (x <= 4.1e-305) {
tmp = y * z;
} else if (x <= 8.6e+127) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.1e+84: tmp = x elif x <= -65.0: tmp = t * a elif x <= 4.1e-305: tmp = y * z elif x <= 8.6e+127: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.1e+84) tmp = x; elseif (x <= -65.0) tmp = Float64(t * a); elseif (x <= 4.1e-305) tmp = Float64(y * z); elseif (x <= 8.6e+127) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.1e+84) tmp = x; elseif (x <= -65.0) tmp = t * a; elseif (x <= 4.1e-305) tmp = y * z; elseif (x <= 8.6e+127) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.1e+84], x, If[LessEqual[x, -65.0], N[(t * a), $MachinePrecision], If[LessEqual[x, 4.1e-305], N[(y * z), $MachinePrecision], If[LessEqual[x, 8.6e+127], N[(t * a), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+84}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -65:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-305}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+127}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.0999999999999999e84 or 8.59999999999999968e127 < x Initial program 93.8%
associate-+l+93.8%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in z around 0 65.8%
Taylor expanded in x around inf 56.6%
if -1.0999999999999999e84 < x < -65 or 4.1000000000000002e-305 < x < 8.59999999999999968e127Initial program 93.2%
associate-+l+93.2%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in z around 0 61.5%
Taylor expanded in x around 0 44.7%
if -65 < x < 4.1000000000000002e-305Initial program 93.5%
associate-+l+93.5%
+-commutative93.5%
fma-define93.5%
associate-*l*89.4%
*-commutative89.4%
*-commutative89.4%
distribute-rgt-out89.4%
remove-double-neg89.4%
*-commutative89.4%
distribute-lft-neg-out89.4%
sub-neg89.4%
sub-neg89.4%
distribute-lft-neg-in89.4%
remove-double-neg89.4%
Simplified89.4%
+-commutative89.4%
distribute-rgt-in89.4%
*-commutative89.4%
associate-*r*93.5%
*-commutative93.5%
associate-*l*93.2%
Applied egg-rr93.2%
Taylor expanded in y around inf 43.7%
*-commutative43.7%
Simplified43.7%
Final simplification48.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7e+162) (+ x (* b (* a (+ z (/ t b))))) (+ (+ x (* y z)) (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+162) {
tmp = x + (b * (a * (z + (t / b))));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (b <= (-7d+162)) then
tmp = x + (b * (a * (z + (t / b))))
else
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7e+162) {
tmp = x + (b * (a * (z + (t / b))));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7e+162: tmp = x + (b * (a * (z + (t / b)))) else: tmp = (x + (y * z)) + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7e+162) tmp = Float64(x + Float64(b * Float64(a * Float64(z + Float64(t / b))))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7e+162) tmp = x + (b * (a * (z + (t / b)))); else tmp = (x + (y * z)) + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7e+162], N[(x + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+162}:\\
\;\;\;\;x + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if b < -7.00000000000000036e162Initial program 91.1%
associate-+l+91.1%
associate-*l*79.9%
Simplified79.9%
Taylor expanded in y around 0 82.9%
Taylor expanded in b around inf 94.2%
associate-/l*97.1%
distribute-lft-out97.1%
Simplified97.1%
if -7.00000000000000036e162 < b Initial program 93.8%
associate-+l+93.8%
associate-*l*94.2%
Simplified94.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.4e-6) (not (<= a 4.2e+40))) (+ x (* a (+ t (* z b)))) (+ x (+ (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e-6) || !(a <= 4.2e+40)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((y * z) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a <= (-4.4d-6)) .or. (.not. (a <= 4.2d+40))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((y * z) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e-6) || !(a <= 4.2e+40)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((y * z) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.4e-6) or not (a <= 4.2e+40): tmp = x + (a * (t + (z * b))) else: tmp = x + ((y * z) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.4e-6) || !(a <= 4.2e+40)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(y * z) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.4e-6) || ~((a <= 4.2e+40))) tmp = x + (a * (t + (z * b))); else tmp = x + ((y * z) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.4e-6], N[Not[LessEqual[a, 4.2e+40]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-6} \lor \neg \left(a \leq 4.2 \cdot 10^{+40}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\
\end{array}
\end{array}
if a < -4.4000000000000002e-6 or 4.2000000000000002e40 < a Initial program 88.2%
associate-+l+88.2%
+-commutative88.2%
fma-define88.2%
associate-*l*93.5%
*-commutative93.5%
*-commutative93.5%
distribute-rgt-out97.5%
remove-double-neg97.5%
*-commutative97.5%
distribute-lft-neg-out97.5%
sub-neg97.5%
sub-neg97.5%
distribute-lft-neg-in97.5%
remove-double-neg97.5%
Simplified97.5%
Taylor expanded in y around 0 92.3%
if -4.4000000000000002e-6 < a < 4.2000000000000002e40Initial program 98.5%
associate-+l+98.5%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around 0 87.8%
Final simplification90.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.45e+180) (not (<= z 4.5e+140))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.45e+180) || !(z <= 4.5e+140)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-3.45d+180)) .or. (.not. (z <= 4.5d+140))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.45e+180) || !(z <= 4.5e+140)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.45e+180) or not (z <= 4.5e+140): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.45e+180) || !(z <= 4.5e+140)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.45e+180) || ~((z <= 4.5e+140))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.45e+180], N[Not[LessEqual[z, 4.5e+140]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{+180} \lor \neg \left(z \leq 4.5 \cdot 10^{+140}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -3.4499999999999998e180 or 4.5000000000000002e140 < z Initial program 83.3%
associate-+l+83.3%
associate-*l*79.3%
Simplified79.3%
Taylor expanded in z around inf 86.9%
if -3.4499999999999998e180 < z < 4.5000000000000002e140Initial program 97.4%
associate-+l+97.4%
+-commutative97.4%
fma-define97.4%
associate-*l*97.3%
*-commutative97.3%
*-commutative97.3%
distribute-rgt-out98.9%
remove-double-neg98.9%
*-commutative98.9%
distribute-lft-neg-out98.9%
sub-neg98.9%
sub-neg98.9%
distribute-lft-neg-in98.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in y around 0 84.2%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e+56) (not (<= z 2.9e-27))) (* z (+ y (* a b))) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+56) || !(z <= 2.9e-27)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-6.2d+56)) .or. (.not. (z <= 2.9d-27))) then
tmp = z * (y + (a * b))
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+56) || !(z <= 2.9e-27)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e+56) or not (z <= 2.9e-27): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e+56) || !(z <= 2.9e-27)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e+56) || ~((z <= 2.9e-27))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+56], N[Not[LessEqual[z, 2.9e-27]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+56} \lor \neg \left(z \leq 2.9 \cdot 10^{-27}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -6.20000000000000009e56 or 2.90000000000000004e-27 < z Initial program 88.5%
associate-+l+88.5%
associate-*l*85.5%
Simplified85.5%
Taylor expanded in z around inf 77.1%
if -6.20000000000000009e56 < z < 2.90000000000000004e-27Initial program 98.4%
associate-+l+98.4%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around 0 78.3%
Final simplification77.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.65e-22) (not (<= a 4.4e+147))) (* a (+ t (* z b))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.65e-22) || !(a <= 4.4e+147)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a <= (-1.65d-22)) .or. (.not. (a <= 4.4d+147))) then
tmp = a * (t + (z * b))
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.65e-22) || !(a <= 4.4e+147)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.65e-22) or not (a <= 4.4e+147): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.65e-22) || !(a <= 4.4e+147)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.65e-22) || ~((a <= 4.4e+147))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.65e-22], N[Not[LessEqual[a, 4.4e+147]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-22} \lor \neg \left(a \leq 4.4 \cdot 10^{+147}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -1.65e-22 or 4.4000000000000003e147 < a Initial program 87.8%
associate-+l+87.8%
+-commutative87.8%
fma-define87.8%
associate-*l*92.9%
*-commutative92.9%
*-commutative92.9%
distribute-rgt-out97.3%
remove-double-neg97.3%
*-commutative97.3%
distribute-lft-neg-out97.3%
sub-neg97.3%
sub-neg97.3%
distribute-lft-neg-in97.3%
remove-double-neg97.3%
Simplified97.3%
Taylor expanded in y around 0 93.1%
Taylor expanded in x around 0 82.1%
if -1.65e-22 < a < 4.4000000000000003e147Initial program 97.9%
associate-+l+97.9%
+-commutative97.9%
fma-define97.9%
associate-*l*91.8%
*-commutative91.8%
*-commutative91.8%
distribute-rgt-out91.8%
remove-double-neg91.8%
*-commutative91.8%
distribute-lft-neg-out91.8%
sub-neg91.8%
sub-neg91.8%
distribute-lft-neg-in91.8%
remove-double-neg91.8%
Simplified91.8%
+-commutative91.8%
distribute-rgt-in91.8%
*-commutative91.8%
associate-*r*97.9%
*-commutative97.9%
associate-*l*97.9%
Applied egg-rr97.9%
Taylor expanded in a around 0 73.1%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -200000.0) (not (<= a 5e+141))) (+ x (* t a)) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -200000.0) || !(a <= 5e+141)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a <= (-200000.0d0)) .or. (.not. (a <= 5d+141))) then
tmp = x + (t * a)
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -200000.0) || !(a <= 5e+141)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -200000.0) or not (a <= 5e+141): tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -200000.0) || !(a <= 5e+141)) tmp = Float64(x + Float64(t * a)); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -200000.0) || ~((a <= 5e+141))) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -200000.0], N[Not[LessEqual[a, 5e+141]], $MachinePrecision]], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -200000 \lor \neg \left(a \leq 5 \cdot 10^{+141}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -2e5 or 5.00000000000000025e141 < a Initial program 87.4%
associate-+l+87.4%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in z around 0 54.8%
if -2e5 < a < 5.00000000000000025e141Initial program 97.9%
associate-+l+97.9%
+-commutative97.9%
fma-define97.9%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
distribute-rgt-out92.0%
remove-double-neg92.0%
*-commutative92.0%
distribute-lft-neg-out92.0%
sub-neg92.0%
sub-neg92.0%
distribute-lft-neg-in92.0%
remove-double-neg92.0%
Simplified92.0%
+-commutative92.0%
distribute-rgt-in92.1%
*-commutative92.1%
associate-*r*97.9%
*-commutative97.9%
associate-*l*97.9%
Applied egg-rr97.9%
Taylor expanded in a around 0 71.9%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.65e+167) (not (<= z 2.3e+14))) (* a (* z b)) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.65e+167) || !(z <= 2.3e+14)) {
tmp = a * (z * b);
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1.65d+167)) .or. (.not. (z <= 2.3d+14))) then
tmp = a * (z * b)
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.65e+167) || !(z <= 2.3e+14)) {
tmp = a * (z * b);
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.65e+167) or not (z <= 2.3e+14): tmp = a * (z * b) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.65e+167) || !(z <= 2.3e+14)) tmp = Float64(a * Float64(z * b)); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.65e+167) || ~((z <= 2.3e+14))) tmp = a * (z * b); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.65e+167], N[Not[LessEqual[z, 2.3e+14]], $MachinePrecision]], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+167} \lor \neg \left(z \leq 2.3 \cdot 10^{+14}\right):\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.65000000000000009e167 or 2.3e14 < z Initial program 85.8%
associate-+l+85.8%
+-commutative85.8%
fma-define85.8%
associate-*l*82.8%
*-commutative82.8%
*-commutative82.8%
distribute-rgt-out85.9%
remove-double-neg85.9%
*-commutative85.9%
distribute-lft-neg-out85.9%
sub-neg85.9%
sub-neg85.9%
distribute-lft-neg-in85.9%
remove-double-neg85.9%
Simplified85.9%
Taylor expanded in y around 0 60.2%
Taylor expanded in x around 0 52.7%
Taylor expanded in t around 0 44.8%
if -1.65000000000000009e167 < z < 2.3e14Initial program 98.1%
associate-+l+98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in z around 0 71.1%
Final simplification61.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.5e+61) (not (<= t 1.95e-82))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e+61) || !(t <= 1.95e-82)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((t <= (-8.5d+61)) .or. (.not. (t <= 1.95d-82))) then
tmp = t * a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e+61) || !(t <= 1.95e-82)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.5e+61) or not (t <= 1.95e-82): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.5e+61) || !(t <= 1.95e-82)) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.5e+61) || ~((t <= 1.95e-82))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.5e+61], N[Not[LessEqual[t, 1.95e-82]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+61} \lor \neg \left(t \leq 1.95 \cdot 10^{-82}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -8.50000000000000035e61 or 1.94999999999999987e-82 < t Initial program 92.3%
associate-+l+92.3%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in z around 0 58.1%
Taylor expanded in x around 0 44.0%
if -8.50000000000000035e61 < t < 1.94999999999999987e-82Initial program 94.9%
associate-+l+94.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in z around 0 45.1%
Taylor expanded in x around inf 41.0%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.5%
associate-+l+93.5%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around 0 52.2%
Taylor expanded in x around inf 27.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
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 t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024130
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))