
(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);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 11 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);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 (fma z y (+ x (* a (fma b z t)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, y, (x + (a * fma(b, z, t))));
}
function code(x, y, z, t, a, b) return fma(z, y, Float64(x + Float64(a * fma(b, z, t)))) end
code[x_, y_, z_, t_, a_, b_] := N[(z * y + N[(x + N[(a * N[(b * z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, y, x + a \cdot \mathsf{fma}\left(b, z, t\right)\right)
\end{array}
Initial program 92.9%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
fp-cancel-sub-sign-invN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
remove-double-negN/A
lift-*.f64N/A
associate-+r+N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
Applied rewrites97.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.5e+92) (fma (fma b a y) z x) (if (<= x 2.8e-56) (fma (fma b z t) a (* z y)) (fma (fma b z t) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.5e+92) {
tmp = fma(fma(b, a, y), z, x);
} else if (x <= 2.8e-56) {
tmp = fma(fma(b, z, t), a, (z * y));
} else {
tmp = fma(fma(b, z, t), a, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.5e+92) tmp = fma(fma(b, a, y), z, x); elseif (x <= 2.8e-56) tmp = fma(fma(b, z, t), a, Float64(z * y)); else tmp = fma(fma(b, z, t), a, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.5e+92], N[(N[(b * a + y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[x, 2.8e-56], N[(N[(b * z + t), $MachinePrecision] * a + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(b * z + t), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+92}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\
\end{array}
\end{array}
if x < -4.4999999999999999e92Initial program 86.6%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
remove-double-negN/A
mul-1-negN/A
distribute-lft-outN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f6494.2
Applied rewrites94.2%
if -4.4999999999999999e92 < x < 2.79999999999999993e-56Initial program 91.7%
Taylor expanded in x around 0
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6492.2
Applied rewrites92.2%
if 2.79999999999999993e-56 < x Initial program 98.7%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6490.7
Applied rewrites90.7%
Final simplification92.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.2e+33) (not (<= a 6e+39))) (fma (fma b z t) a x) (fma (fma b a y) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.2e+33) || !(a <= 6e+39)) {
tmp = fma(fma(b, z, t), a, x);
} else {
tmp = fma(fma(b, a, y), z, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.2e+33) || !(a <= 6e+39)) tmp = fma(fma(b, z, t), a, x); else tmp = fma(fma(b, a, y), z, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.2e+33], N[Not[LessEqual[a, 6e+39]], $MachinePrecision]], N[(N[(b * z + t), $MachinePrecision] * a + x), $MachinePrecision], N[(N[(b * a + y), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+33} \lor \neg \left(a \leq 6 \cdot 10^{+39}\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\
\end{array}
\end{array}
if a < -3.20000000000000017e33 or 5.9999999999999999e39 < a Initial program 85.0%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6491.8
Applied rewrites91.8%
if -3.20000000000000017e33 < a < 5.9999999999999999e39Initial program 98.6%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
remove-double-negN/A
mul-1-negN/A
distribute-lft-outN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f6492.0
Applied rewrites92.0%
Final simplification91.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2e+142) (not (<= t 4.2e+46))) (fma a t (fma z y x)) (fma (fma b a y) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e+142) || !(t <= 4.2e+46)) {
tmp = fma(a, t, fma(z, y, x));
} else {
tmp = fma(fma(b, a, y), z, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2e+142) || !(t <= 4.2e+46)) tmp = fma(a, t, fma(z, y, x)); else tmp = fma(fma(b, a, y), z, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2e+142], N[Not[LessEqual[t, 4.2e+46]], $MachinePrecision]], N[(a * t + N[(z * y + x), $MachinePrecision]), $MachinePrecision], N[(N[(b * a + y), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+142} \lor \neg \left(t \leq 4.2 \cdot 10^{+46}\right):\\
\;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\
\end{array}
\end{array}
if t < -2.0000000000000001e142 or 4.2e46 < t Initial program 88.7%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6474.0
Applied rewrites74.0%
Taylor expanded in z around inf
Applied rewrites30.8%
Taylor expanded in b around 0
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lft-identityN/A
Applied rewrites96.7%
if -2.0000000000000001e142 < t < 4.2e46Initial program 95.2%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
remove-double-negN/A
mul-1-negN/A
distribute-lft-outN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f6488.2
Applied rewrites88.2%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+61)
(fma z y x)
(if (<= y -3.8e-74)
(* (fma b a y) z)
(if (<= y 1.75e-64) (fma a t x) (fma z y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+61) {
tmp = fma(z, y, x);
} else if (y <= -3.8e-74) {
tmp = fma(b, a, y) * z;
} else if (y <= 1.75e-64) {
tmp = fma(a, t, x);
} else {
tmp = fma(z, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+61) tmp = fma(z, y, x); elseif (y <= -3.8e-74) tmp = Float64(fma(b, a, y) * z); elseif (y <= 1.75e-64) tmp = fma(a, t, x); else tmp = fma(z, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+61], N[(z * y + x), $MachinePrecision], If[LessEqual[y, -3.8e-74], N[(N[(b * a + y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[y, 1.75e-64], N[(a * t + x), $MachinePrecision], N[(z * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(b, a, y\right) \cdot z\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
\end{array}
\end{array}
if y < -3.79999999999999995e61 or 1.7500000000000002e-64 < y Initial program 93.1%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6462.9
Applied rewrites62.9%
Taylor expanded in z around inf
Applied rewrites51.0%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f6476.2
Applied rewrites76.2%
if -3.79999999999999995e61 < y < -3.7999999999999996e-74Initial program 95.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
remove-double-negN/A
mul-1-negN/A
distribute-lft-outN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f6473.4
Applied rewrites73.4%
if -3.7999999999999996e-74 < y < 1.7500000000000002e-64Initial program 92.2%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6495.3
Applied rewrites95.3%
Taylor expanded in z around inf
Applied rewrites63.5%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6473.5
Applied rewrites73.5%
Final simplification74.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.6e+141) (fma (* b a) z x) (if (<= b 1.15e+201) (fma a t (fma z y x)) (fma (* z b) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.6e+141) {
tmp = fma((b * a), z, x);
} else if (b <= 1.15e+201) {
tmp = fma(a, t, fma(z, y, x));
} else {
tmp = fma((z * b), a, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.6e+141) tmp = fma(Float64(b * a), z, x); elseif (b <= 1.15e+201) tmp = fma(a, t, fma(z, y, x)); else tmp = fma(Float64(z * b), a, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.6e+141], N[(N[(b * a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[b, 1.15e+201], N[(a * t + N[(z * y + x), $MachinePrecision]), $MachinePrecision], N[(N[(z * b), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{+141}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot a, z, x\right)\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+201}:\\
\;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot b, a, x\right)\\
\end{array}
\end{array}
if b < -4.6000000000000003e141Initial program 96.2%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
remove-double-negN/A
mul-1-negN/A
distribute-lft-outN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f6488.9
Applied rewrites88.9%
Taylor expanded in y around 0
Applied rewrites85.1%
if -4.6000000000000003e141 < b < 1.1500000000000001e201Initial program 93.3%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6473.1
Applied rewrites73.1%
Taylor expanded in z around inf
Applied rewrites49.8%
Taylor expanded in b around 0
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lft-identityN/A
Applied rewrites86.4%
if 1.1500000000000001e201 < b Initial program 84.2%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6495.0
Applied rewrites95.0%
Taylor expanded in z around inf
Applied rewrites88.7%
Final simplification86.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.2e+76) (not (<= a 2.05e+39))) (* (fma b z t) a) (fma z y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.2e+76) || !(a <= 2.05e+39)) {
tmp = fma(b, z, t) * a;
} else {
tmp = fma(z, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.2e+76) || !(a <= 2.05e+39)) tmp = Float64(fma(b, z, t) * a); else tmp = fma(z, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.2e+76], N[Not[LessEqual[a, 2.05e+39]], $MachinePrecision]], N[(N[(b * z + t), $MachinePrecision] * a), $MachinePrecision], N[(z * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+76} \lor \neg \left(a \leq 2.05 \cdot 10^{+39}\right):\\
\;\;\;\;\mathsf{fma}\left(b, z, t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
\end{array}
\end{array}
if a < -8.1999999999999997e76 or 2.05000000000000002e39 < a Initial program 85.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f6479.1
Applied rewrites79.1%
if -8.1999999999999997e76 < a < 2.05000000000000002e39Initial program 97.5%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6466.9
Applied rewrites66.9%
Taylor expanded in z around inf
Applied rewrites57.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f6478.3
Applied rewrites78.3%
Final simplification78.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.3e+97) (not (<= y 1.75e-64))) (fma z y x) (fma a t x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.3e+97) || !(y <= 1.75e-64)) {
tmp = fma(z, y, x);
} else {
tmp = fma(a, t, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.3e+97) || !(y <= 1.75e-64)) tmp = fma(z, y, x); else tmp = fma(a, t, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.3e+97], N[Not[LessEqual[y, 1.75e-64]], $MachinePrecision]], N[(z * y + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+97} \lor \neg \left(y \leq 1.75 \cdot 10^{-64}\right):\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
\end{array}
\end{array}
if y < -1.3e97 or 1.7500000000000002e-64 < y Initial program 92.6%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6460.1
Applied rewrites60.1%
Taylor expanded in z around inf
Applied rewrites48.9%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f6476.7
Applied rewrites76.7%
if -1.3e97 < y < 1.7500000000000002e-64Initial program 93.3%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6491.2
Applied rewrites91.2%
Taylor expanded in z around inf
Applied rewrites62.2%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6468.0
Applied rewrites68.0%
Final simplification72.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e+140) (not (<= y 9e+167))) (* y z) (fma a t x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+140) || !(y <= 9e+167)) {
tmp = y * z;
} else {
tmp = fma(a, t, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.2e+140) || !(y <= 9e+167)) tmp = Float64(y * z); else tmp = fma(a, t, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.2e+140], N[Not[LessEqual[y, 9e+167]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(a * t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+140} \lor \neg \left(y \leq 9 \cdot 10^{+167}\right):\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
\end{array}
\end{array}
if y < -7.1999999999999999e140 or 8.9999999999999998e167 < y Initial program 86.7%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
fp-cancel-sub-sign-invN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
remove-double-negN/A
lift-*.f64N/A
associate-+r+N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
Applied rewrites96.7%
Taylor expanded in y around inf
lower-*.f6465.8
Applied rewrites65.8%
if -7.1999999999999999e140 < y < 8.9999999999999998e167Initial program 94.9%
Taylor expanded in y around 0
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6485.5
Applied rewrites85.5%
Taylor expanded in z around inf
Applied rewrites61.8%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.8
Applied rewrites65.8%
Final simplification65.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.8e+81) (not (<= y 1.75e-64))) (* y z) (* a t)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8e+81) || !(y <= 1.75e-64)) {
tmp = y * z;
} else {
tmp = a * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 ((y <= (-3.8d+81)) .or. (.not. (y <= 1.75d-64))) then
tmp = y * z
else
tmp = a * t
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 ((y <= -3.8e+81) || !(y <= 1.75e-64)) {
tmp = y * z;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8e+81) or not (y <= 1.75e-64): tmp = y * z else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8e+81) || !(y <= 1.75e-64)) tmp = Float64(y * z); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.8e+81) || ~((y <= 1.75e-64))) tmp = y * z; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8e+81], N[Not[LessEqual[y, 1.75e-64]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(a * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+81} \lor \neg \left(y \leq 1.75 \cdot 10^{-64}\right):\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if y < -3.8e81 or 1.7500000000000002e-64 < y Initial program 92.8%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
fp-cancel-sub-sign-invN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
remove-double-negN/A
lift-*.f64N/A
associate-+r+N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
Applied rewrites97.6%
Taylor expanded in y around inf
lower-*.f6445.2
Applied rewrites45.2%
if -3.8e81 < y < 1.7500000000000002e-64Initial program 93.1%
Taylor expanded in t around inf
lower-*.f6433.0
Applied rewrites33.0%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (* y z))
double code(double x, double y, double z, double t, double a, double b) {
return y * z;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = y * z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return y * z;
}
def code(x, y, z, t, a, b): return y * z
function code(x, y, z, t, a, b) return Float64(y * z) end
function tmp = code(x, y, z, t, a, b) tmp = y * z; end
code[x_, y_, z_, t_, a_, b_] := N[(y * z), $MachinePrecision]
\begin{array}{l}
\\
y \cdot z
\end{array}
Initial program 92.9%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
fp-cancel-sub-sign-invN/A
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
remove-double-negN/A
lift-*.f64N/A
associate-+r+N/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
Applied rewrites97.3%
Taylor expanded in y around inf
lower-*.f6426.2
Applied rewrites26.2%
(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;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 2024350
(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)))