
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -2e+74) (not (<= y 4.2e-17))) (/ y (/ z (- z x))) (/ (+ x (* y (- z x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2e+74) || !(y <= 4.2e-17)) {
tmp = y / (z / (z - x));
} else {
tmp = (x + (y * (z - x))) / z;
}
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 ((y <= (-2d+74)) .or. (.not. (y <= 4.2d-17))) then
tmp = y / (z / (z - x))
else
tmp = (x + (y * (z - x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2e+74) || !(y <= 4.2e-17)) {
tmp = y / (z / (z - x));
} else {
tmp = (x + (y * (z - x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2e+74) or not (y <= 4.2e-17): tmp = y / (z / (z - x)) else: tmp = (x + (y * (z - x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2e+74) || !(y <= 4.2e-17)) tmp = Float64(y / Float64(z / Float64(z - x))); else tmp = Float64(Float64(x + Float64(y * Float64(z - x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2e+74) || ~((y <= 4.2e-17))) tmp = y / (z / (z - x)); else tmp = (x + (y * (z - x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2e+74], N[Not[LessEqual[y, 4.2e-17]], $MachinePrecision]], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+74} \lor \neg \left(y \leq 4.2 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\end{array}
\end{array}
if y < -1.9999999999999999e74 or 4.19999999999999984e-17 < y Initial program 75.6%
Taylor expanded in y around inf 75.6%
associate-/l*100.0%
Simplified100.0%
if -1.9999999999999999e74 < y < 4.19999999999999984e-17Initial program 99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (/ y z))))
(if (<= y -5e-34)
t_0
(if (<= y 3.1e-87)
(/ x z)
(if (<= y 3.4e-46) y (if (<= y 3.8e-17) (/ x z) t_0))))))
double code(double x, double y, double z) {
double t_0 = z * (y / z);
double tmp;
if (y <= -5e-34) {
tmp = t_0;
} else if (y <= 3.1e-87) {
tmp = x / z;
} else if (y <= 3.4e-46) {
tmp = y;
} else if (y <= 3.8e-17) {
tmp = x / z;
} 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 = z * (y / z)
if (y <= (-5d-34)) then
tmp = t_0
else if (y <= 3.1d-87) then
tmp = x / z
else if (y <= 3.4d-46) then
tmp = y
else if (y <= 3.8d-17) then
tmp = x / z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (y / z);
double tmp;
if (y <= -5e-34) {
tmp = t_0;
} else if (y <= 3.1e-87) {
tmp = x / z;
} else if (y <= 3.4e-46) {
tmp = y;
} else if (y <= 3.8e-17) {
tmp = x / z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (y / z) tmp = 0 if y <= -5e-34: tmp = t_0 elif y <= 3.1e-87: tmp = x / z elif y <= 3.4e-46: tmp = y elif y <= 3.8e-17: tmp = x / z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(y / z)) tmp = 0.0 if (y <= -5e-34) tmp = t_0; elseif (y <= 3.1e-87) tmp = Float64(x / z); elseif (y <= 3.4e-46) tmp = y; elseif (y <= 3.8e-17) tmp = Float64(x / z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (y / z); tmp = 0.0; if (y <= -5e-34) tmp = t_0; elseif (y <= 3.1e-87) tmp = x / z; elseif (y <= 3.4e-46) tmp = y; elseif (y <= 3.8e-17) tmp = x / z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e-34], t$95$0, If[LessEqual[y, 3.1e-87], N[(x / z), $MachinePrecision], If[LessEqual[y, 3.4e-46], y, If[LessEqual[y, 3.8e-17], N[(x / z), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -5 \cdot 10^{-34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-46}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-17}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -5.0000000000000003e-34 or 3.8000000000000001e-17 < y Initial program 79.3%
Taylor expanded in x around 0 36.6%
associate-/l*55.2%
associate-/r/61.2%
Applied egg-rr61.2%
if -5.0000000000000003e-34 < y < 3.09999999999999998e-87 or 3.39999999999999996e-46 < y < 3.8000000000000001e-17Initial program 99.9%
Taylor expanded in y around 0 77.6%
if 3.09999999999999998e-87 < y < 3.39999999999999996e-46Initial program 100.0%
Taylor expanded in x around 0 71.0%
Final simplification68.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.0) (not (<= y 4.2e-17))) (* (- z x) (/ y z)) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 4.2e-17)) {
tmp = (z - x) * (y / z);
} else {
tmp = y + (x / z);
}
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 ((y <= (-1.0d0)) .or. (.not. (y <= 4.2d-17))) then
tmp = (z - x) * (y / z)
else
tmp = y + (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 4.2e-17)) {
tmp = (z - x) * (y / z);
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.0) or not (y <= 4.2e-17): tmp = (z - x) * (y / z) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.0) || !(y <= 4.2e-17)) tmp = Float64(Float64(z - x) * Float64(y / z)); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.0) || ~((y <= 4.2e-17))) tmp = (z - x) * (y / z); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 4.2e-17]], $MachinePrecision]], N[(N[(z - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 4.2 \cdot 10^{-17}\right):\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
if y < -1 or 4.19999999999999984e-17 < y Initial program 78.6%
Taylor expanded in y around inf 77.7%
associate-/l*99.1%
associate-/r/92.6%
Simplified92.6%
if -1 < y < 4.19999999999999984e-17Initial program 99.9%
Taylor expanded in x around inf 100.0%
Taylor expanded in y around 0 99.7%
Final simplification96.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.0) (not (<= y 4.2e-17))) (/ y (/ z (- z x))) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 4.2e-17)) {
tmp = y / (z / (z - x));
} else {
tmp = y + (x / z);
}
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 ((y <= (-1.0d0)) .or. (.not. (y <= 4.2d-17))) then
tmp = y / (z / (z - x))
else
tmp = y + (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 4.2e-17)) {
tmp = y / (z / (z - x));
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.0) or not (y <= 4.2e-17): tmp = y / (z / (z - x)) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.0) || !(y <= 4.2e-17)) tmp = Float64(y / Float64(z / Float64(z - x))); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.0) || ~((y <= 4.2e-17))) tmp = y / (z / (z - x)); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 4.2e-17]], $MachinePrecision]], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 4.2 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
if y < -1 or 4.19999999999999984e-17 < y Initial program 78.6%
Taylor expanded in y around inf 77.7%
associate-/l*99.1%
Simplified99.1%
if -1 < y < 4.19999999999999984e-17Initial program 99.9%
Taylor expanded in x around inf 100.0%
Taylor expanded in y around 0 99.7%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (<= y 4.2e-17) (+ y (/ (* x (- 1.0 y)) z)) (/ y (/ z (- z x)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 4.2e-17) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = y / (z / (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 (y <= 4.2d-17) then
tmp = y + ((x * (1.0d0 - y)) / z)
else
tmp = y / (z / (z - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 4.2e-17) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = y / (z / (z - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 4.2e-17: tmp = y + ((x * (1.0 - y)) / z) else: tmp = y / (z / (z - x)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 4.2e-17) tmp = Float64(y + Float64(Float64(x * Float64(1.0 - y)) / z)); else tmp = Float64(y / Float64(z / Float64(z - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 4.2e-17) tmp = y + ((x * (1.0 - y)) / z); else tmp = y / (z / (z - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 4.2e-17], N[(y + N[(N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.2 \cdot 10^{-17}:\\
\;\;\;\;y + \frac{x \cdot \left(1 - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\end{array}
\end{array}
if y < 4.19999999999999984e-17Initial program 94.8%
Taylor expanded in x around inf 98.9%
if 4.19999999999999984e-17 < y Initial program 74.0%
Taylor expanded in y around inf 74.0%
associate-/l*99.9%
Simplified99.9%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -6.2e-296) (not (<= z 1.1e-227))) (+ y (/ x z)) (/ y (/ (- z) x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.2e-296) || !(z <= 1.1e-227)) {
tmp = y + (x / z);
} else {
tmp = y / (-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 ((z <= (-6.2d-296)) .or. (.not. (z <= 1.1d-227))) then
tmp = y + (x / z)
else
tmp = y / (-z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6.2e-296) || !(z <= 1.1e-227)) {
tmp = y + (x / z);
} else {
tmp = y / (-z / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6.2e-296) or not (z <= 1.1e-227): tmp = y + (x / z) else: tmp = y / (-z / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6.2e-296) || !(z <= 1.1e-227)) tmp = Float64(y + Float64(x / z)); else tmp = Float64(y / Float64(Float64(-z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6.2e-296) || ~((z <= 1.1e-227))) tmp = y + (x / z); else tmp = y / (-z / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.2e-296], N[Not[LessEqual[z, 1.1e-227]], $MachinePrecision]], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision], N[(y / N[((-z) / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-296} \lor \neg \left(z \leq 1.1 \cdot 10^{-227}\right):\\
\;\;\;\;y + \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{-z}{x}}\\
\end{array}
\end{array}
if z < -6.2000000000000004e-296 or 1.0999999999999999e-227 < z Initial program 88.0%
Taylor expanded in x around inf 96.3%
Taylor expanded in y around 0 84.6%
if -6.2000000000000004e-296 < z < 1.0999999999999999e-227Initial program 99.8%
Taylor expanded in y around inf 80.6%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in z around 0 85.5%
associate-*r/85.5%
neg-mul-185.5%
Simplified85.5%
Final simplification84.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -255000.0) (not (<= x 2.8e+88))) (/ x z) y))
double code(double x, double y, double z) {
double tmp;
if ((x <= -255000.0) || !(x <= 2.8e+88)) {
tmp = x / z;
} else {
tmp = y;
}
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 <= (-255000.0d0)) .or. (.not. (x <= 2.8d+88))) then
tmp = x / z
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -255000.0) || !(x <= 2.8e+88)) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -255000.0) or not (x <= 2.8e+88): tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -255000.0) || !(x <= 2.8e+88)) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -255000.0) || ~((x <= 2.8e+88))) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -255000.0], N[Not[LessEqual[x, 2.8e+88]], $MachinePrecision]], N[(x / z), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -255000 \lor \neg \left(x \leq 2.8 \cdot 10^{+88}\right):\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -255000 or 2.79999999999999989e88 < x Initial program 90.9%
Taylor expanded in y around 0 64.0%
if -255000 < x < 2.79999999999999989e88Initial program 87.3%
Taylor expanded in x around 0 66.1%
Final simplification65.2%
(FPCore (x y z) :precision binary64 (+ y (/ x z)))
double code(double x, double y, double z) {
return y + (x / z);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y + (x / z)
end function
public static double code(double x, double y, double z) {
return y + (x / z);
}
def code(x, y, z): return y + (x / z)
function code(x, y, z) return Float64(y + Float64(x / z)) end
function tmp = code(x, y, z) tmp = y + (x / z); end
code[x_, y_, z_] := N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \frac{x}{z}
\end{array}
Initial program 88.9%
Taylor expanded in x around inf 96.6%
Taylor expanded in y around 0 81.9%
Final simplification81.9%
(FPCore (x y z) :precision binary64 y)
double code(double x, double y, double z) {
return y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y
end function
public static double code(double x, double y, double z) {
return y;
}
def code(x, y, z): return y
function code(x, y, z) return y end
function tmp = code(x, y, z) tmp = y; end
code[x_, y_, z_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 88.9%
Taylor expanded in x around 0 43.0%
Final simplification43.0%
(FPCore (x y z) :precision binary64 (- (+ y (/ x z)) (/ y (/ z x))))
double code(double x, double y, double z) {
return (y + (x / z)) - (y / (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 = (y + (x / z)) - (y / (z / x))
end function
public static double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
def code(x, y, z): return (y + (x / z)) - (y / (z / x))
function code(x, y, z) return Float64(Float64(y + Float64(x / z)) - Float64(y / Float64(z / x))) end
function tmp = code(x, y, z) tmp = (y + (x / z)) - (y / (z / x)); end
code[x_, y_, z_] := N[(N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \frac{x}{z}\right) - \frac{y}{\frac{z}{x}}
\end{array}
herbie shell --seed 2023322
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))