
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z): return (x * (y + z)) + (z * 5.0)
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0)) end
function tmp = code(x, y, z) tmp = (x * (y + z)) + (z * 5.0); end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z): return (x * (y + z)) + (z * 5.0)
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0)) end
function tmp = code(x, y, z) tmp = (x * (y + z)) + (z * 5.0); end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}
(FPCore (x y z) :precision binary64 (fma (+ y z) x (* z 5.0)))
double code(double x, double y, double z) {
return fma((y + z), x, (z * 5.0));
}
function code(x, y, z) return fma(Float64(y + z), x, Float64(z * 5.0)) end
code[x_, y_, z_] := N[(N[(y + z), $MachinePrecision] * x + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + z, x, z \cdot 5\right)
\end{array}
Initial program 99.9%
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.9
Applied rewrites99.9%
(FPCore (x y z) :precision binary64 (if (<= x -5.0) (* x (+ y z)) (if (<= x 2.7e-6) (fma z 5.0 (* y x)) (fma z x (* y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.0) {
tmp = x * (y + z);
} else if (x <= 2.7e-6) {
tmp = fma(z, 5.0, (y * x));
} else {
tmp = fma(z, x, (y * x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -5.0) tmp = Float64(x * Float64(y + z)); elseif (x <= 2.7e-6) tmp = fma(z, 5.0, Float64(y * x)); else tmp = fma(z, x, Float64(y * x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -5.0], N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-6], N[(z * 5.0 + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(z * x + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5:\\
\;\;\;\;x \cdot \left(y + z\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(z, 5, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, x, y \cdot x\right)\\
\end{array}
\end{array}
if x < -5Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6499.7
Applied rewrites99.7%
if -5 < x < 2.69999999999999998e-6Initial program 99.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites98.8%
if 2.69999999999999998e-6 < x Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6499.8
Applied rewrites99.8%
Applied rewrites99.8%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (<= x -5.0) (* x (+ y z)) (if (<= x 2.7e-6) (fma y x (* z 5.0)) (fma z x (* y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.0) {
tmp = x * (y + z);
} else if (x <= 2.7e-6) {
tmp = fma(y, x, (z * 5.0));
} else {
tmp = fma(z, x, (y * x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -5.0) tmp = Float64(x * Float64(y + z)); elseif (x <= 2.7e-6) tmp = fma(y, x, Float64(z * 5.0)); else tmp = fma(z, x, Float64(y * x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -5.0], N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-6], N[(y * x + N[(z * 5.0), $MachinePrecision]), $MachinePrecision], N[(z * x + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5:\\
\;\;\;\;x \cdot \left(y + z\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(y, x, z \cdot 5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, x, y \cdot x\right)\\
\end{array}
\end{array}
if x < -5Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6499.7
Applied rewrites99.7%
if -5 < x < 2.69999999999999998e-6Initial program 99.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites98.8%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6498.8
Applied rewrites98.8%
if 2.69999999999999998e-6 < x Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6499.8
Applied rewrites99.8%
Applied rewrites99.8%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (<= x -6.2e-49) (* x (+ y z)) (if (<= x 1.6e-100) (* z (+ x 5.0)) (fma z x (* y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e-49) {
tmp = x * (y + z);
} else if (x <= 1.6e-100) {
tmp = z * (x + 5.0);
} else {
tmp = fma(z, x, (y * x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -6.2e-49) tmp = Float64(x * Float64(y + z)); elseif (x <= 1.6e-100) tmp = Float64(z * Float64(x + 5.0)); else tmp = fma(z, x, Float64(y * x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -6.2e-49], N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e-100], N[(z * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], N[(z * x + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(y + z\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \left(x + 5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, x, y \cdot x\right)\\
\end{array}
\end{array}
if x < -6.2e-49Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6491.5
Applied rewrites91.5%
if -6.2e-49 < x < 1.60000000000000008e-100Initial program 99.9%
Taylor expanded in y around 0
distribute-rgt-inN/A
lower-*.f64N/A
lower-+.f6472.1
Applied rewrites72.1%
if 1.60000000000000008e-100 < x Initial program 99.9%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6489.8
Applied rewrites89.8%
Applied rewrites89.8%
Final simplification83.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ y z)))) (if (<= x -6.2e-49) t_0 (if (<= x 1.6e-100) (* z (+ x 5.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -6.2e-49) {
tmp = t_0;
} else if (x <= 1.6e-100) {
tmp = z * (x + 5.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y + z)
if (x <= (-6.2d-49)) then
tmp = t_0
else if (x <= 1.6d-100) then
tmp = z * (x + 5.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -6.2e-49) {
tmp = t_0;
} else if (x <= 1.6e-100) {
tmp = z * (x + 5.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y + z) tmp = 0 if x <= -6.2e-49: tmp = t_0 elif x <= 1.6e-100: tmp = z * (x + 5.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y + z)) tmp = 0.0 if (x <= -6.2e-49) tmp = t_0; elseif (x <= 1.6e-100) tmp = Float64(z * Float64(x + 5.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y + z); tmp = 0.0; if (x <= -6.2e-49) tmp = t_0; elseif (x <= 1.6e-100) tmp = z * (x + 5.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e-49], t$95$0, If[LessEqual[x, 1.6e-100], N[(z * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(y + z\right)\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \left(x + 5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.2e-49 or 1.60000000000000008e-100 < x Initial program 99.9%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6490.5
Applied rewrites90.5%
if -6.2e-49 < x < 1.60000000000000008e-100Initial program 99.9%
Taylor expanded in y around 0
distribute-rgt-inN/A
lower-*.f64N/A
lower-+.f6472.1
Applied rewrites72.1%
Final simplification83.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ y z)))) (if (<= x -6.2e-49) t_0 (if (<= x 1.6e-100) (* z 5.0) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -6.2e-49) {
tmp = t_0;
} else if (x <= 1.6e-100) {
tmp = z * 5.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y + z)
if (x <= (-6.2d-49)) then
tmp = t_0
else if (x <= 1.6d-100) then
tmp = z * 5.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -6.2e-49) {
tmp = t_0;
} else if (x <= 1.6e-100) {
tmp = z * 5.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y + z) tmp = 0 if x <= -6.2e-49: tmp = t_0 elif x <= 1.6e-100: tmp = z * 5.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y + z)) tmp = 0.0 if (x <= -6.2e-49) tmp = t_0; elseif (x <= 1.6e-100) tmp = Float64(z * 5.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y + z); tmp = 0.0; if (x <= -6.2e-49) tmp = t_0; elseif (x <= 1.6e-100) tmp = z * 5.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e-49], t$95$0, If[LessEqual[x, 1.6e-100], N[(z * 5.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(y + z\right)\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-100}:\\
\;\;\;\;z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.2e-49 or 1.60000000000000008e-100 < x Initial program 99.9%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6490.5
Applied rewrites90.5%
if -6.2e-49 < x < 1.60000000000000008e-100Initial program 99.9%
Taylor expanded in x around 0
lower-*.f6472.1
Applied rewrites72.1%
Final simplification83.8%
(FPCore (x y z) :precision binary64 (if (<= x -1.46e-49) (* y x) (if (<= x 1.68e-100) (* z 5.0) (* y x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.46e-49) {
tmp = y * x;
} else if (x <= 1.68e-100) {
tmp = z * 5.0;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.46d-49)) then
tmp = y * x
else if (x <= 1.68d-100) then
tmp = z * 5.0d0
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.46e-49) {
tmp = y * x;
} else if (x <= 1.68e-100) {
tmp = z * 5.0;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.46e-49: tmp = y * x elif x <= 1.68e-100: tmp = z * 5.0 else: tmp = y * x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.46e-49) tmp = Float64(y * x); elseif (x <= 1.68e-100) tmp = Float64(z * 5.0); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.46e-49) tmp = y * x; elseif (x <= 1.68e-100) tmp = z * 5.0; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.46e-49], N[(y * x), $MachinePrecision], If[LessEqual[x, 1.68e-100], N[(z * 5.0), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.46 \cdot 10^{-49}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 1.68 \cdot 10^{-100}:\\
\;\;\;\;z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if x < -1.46000000000000007e-49 or 1.68000000000000012e-100 < x Initial program 99.9%
Taylor expanded in y around inf
lower-*.f6462.2
Applied rewrites62.2%
if -1.46000000000000007e-49 < x < 1.68000000000000012e-100Initial program 99.9%
Taylor expanded in x around 0
lower-*.f6472.1
Applied rewrites72.1%
Final simplification65.8%
(FPCore (x y z) :precision binary64 (if (<= x -5.0) (* z x) (if (<= x 0.00325) (* z 5.0) (* z x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.0) {
tmp = z * x;
} else if (x <= 0.00325) {
tmp = z * 5.0;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-5.0d0)) then
tmp = z * x
else if (x <= 0.00325d0) then
tmp = z * 5.0d0
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.0) {
tmp = z * x;
} else if (x <= 0.00325) {
tmp = z * 5.0;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.0: tmp = z * x elif x <= 0.00325: tmp = z * 5.0 else: tmp = z * x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.0) tmp = Float64(z * x); elseif (x <= 0.00325) tmp = Float64(z * 5.0); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.0) tmp = z * x; elseif (x <= 0.00325) tmp = z * 5.0; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.0], N[(z * x), $MachinePrecision], If[LessEqual[x, 0.00325], N[(z * 5.0), $MachinePrecision], N[(z * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 0.00325:\\
\;\;\;\;z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if x < -5 or 0.00324999999999999985 < x Initial program 100.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6499.7
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites41.1%
if -5 < x < 0.00324999999999999985Initial program 99.9%
Taylor expanded in x around 0
lower-*.f6463.4
Applied rewrites63.4%
Final simplification52.0%
(FPCore (x y z) :precision binary64 (fma z (+ x 5.0) (* y x)))
double code(double x, double y, double z) {
return fma(z, (x + 5.0), (y * x));
}
function code(x, y, z) return fma(z, Float64(x + 5.0), Float64(y * x)) end
code[x_, y_, z_] := N[(z * N[(x + 5.0), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, x + 5, y \cdot x\right)
\end{array}
Initial program 99.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f6499.6
Applied rewrites99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (* z x))
double code(double x, double y, double z) {
return z * x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * x
end function
public static double code(double x, double y, double z) {
return z * x;
}
def code(x, y, z): return z * x
function code(x, y, z) return Float64(z * x) end
function tmp = code(x, y, z) tmp = z * x; end
code[x_, y_, z_] := N[(z * x), $MachinePrecision]
\begin{array}{l}
\\
z \cdot x
\end{array}
Initial program 99.9%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
lower-+.f6468.6
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites22.6%
(FPCore (x y z) :precision binary64 (+ (* (+ x 5.0) z) (* x y)))
double code(double x, double y, double z) {
return ((x + 5.0) * z) + (x * y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x + 5.0d0) * z) + (x * y)
end function
public static double code(double x, double y, double z) {
return ((x + 5.0) * z) + (x * y);
}
def code(x, y, z): return ((x + 5.0) * z) + (x * y)
function code(x, y, z) return Float64(Float64(Float64(x + 5.0) * z) + Float64(x * y)) end
function tmp = code(x, y, z) tmp = ((x + 5.0) * z) + (x * y); end
code[x_, y_, z_] := N[(N[(N[(x + 5.0), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + 5\right) \cdot z + x \cdot y
\end{array}
herbie shell --seed 2024233
(FPCore (x y z)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"
:precision binary64
:alt
(! :herbie-platform default (+ (* (+ x 5) z) (* x y)))
(+ (* x (+ y z)) (* z 5.0)))