
(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 (+ y (* (- 1.0 y) (/ x z))))
double code(double x, double y, double z) {
return y + ((1.0 - 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 + ((1.0d0 - y) * (x / z))
end function
public static double code(double x, double y, double z) {
return y + ((1.0 - y) * (x / z));
}
def code(x, y, z): return y + ((1.0 - y) * (x / z))
function code(x, y, z) return Float64(y + Float64(Float64(1.0 - y) * Float64(x / z))) end
function tmp = code(x, y, z) tmp = y + ((1.0 - y) * (x / z)); end
code[x_, y_, z_] := N[(y + N[(N[(1.0 - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \left(1 - y\right) \cdot \frac{x}{z}
\end{array}
Initial program 89.6%
Taylor expanded in x around 0 95.1%
+-commutative95.1%
mul-1-neg95.1%
unsub-neg95.1%
Applied egg-rr95.1%
Taylor expanded in z around 0 94.1%
*-commutative94.1%
associate-*r/99.9%
Simplified99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ x (- z)))))
(if (<= y -4.5e+83)
t_0
(if (<= y 900000000.0)
(+ y (/ x z))
(if (<= y 3.2e+164) t_0 (* z (/ y z)))))))
double code(double x, double y, double z) {
double t_0 = y * (x / -z);
double tmp;
if (y <= -4.5e+83) {
tmp = t_0;
} else if (y <= 900000000.0) {
tmp = y + (x / z);
} else if (y <= 3.2e+164) {
tmp = t_0;
} else {
tmp = z * (y / 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) :: t_0
real(8) :: tmp
t_0 = y * (x / -z)
if (y <= (-4.5d+83)) then
tmp = t_0
else if (y <= 900000000.0d0) then
tmp = y + (x / z)
else if (y <= 3.2d+164) then
tmp = t_0
else
tmp = z * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (x / -z);
double tmp;
if (y <= -4.5e+83) {
tmp = t_0;
} else if (y <= 900000000.0) {
tmp = y + (x / z);
} else if (y <= 3.2e+164) {
tmp = t_0;
} else {
tmp = z * (y / z);
}
return tmp;
}
def code(x, y, z): t_0 = y * (x / -z) tmp = 0 if y <= -4.5e+83: tmp = t_0 elif y <= 900000000.0: tmp = y + (x / z) elif y <= 3.2e+164: tmp = t_0 else: tmp = z * (y / z) return tmp
function code(x, y, z) t_0 = Float64(y * Float64(x / Float64(-z))) tmp = 0.0 if (y <= -4.5e+83) tmp = t_0; elseif (y <= 900000000.0) tmp = Float64(y + Float64(x / z)); elseif (y <= 3.2e+164) tmp = t_0; else tmp = Float64(z * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (x / -z); tmp = 0.0; if (y <= -4.5e+83) tmp = t_0; elseif (y <= 900000000.0) tmp = y + (x / z); elseif (y <= 3.2e+164) tmp = t_0; else tmp = z * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(x / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+83], t$95$0, If[LessEqual[y, 900000000.0], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+164], t$95$0, N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{x}{-z}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+83}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 900000000:\\
\;\;\;\;y + \frac{x}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+164}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.4999999999999999e83 or 9e8 < y < 3.1999999999999998e164Initial program 83.0%
Taylor expanded in y around inf 83.0%
associate-/l*99.8%
div-sub99.8%
*-inverses99.8%
Simplified99.8%
Taylor expanded in x around inf 68.3%
mul-1-neg68.3%
distribute-frac-neg268.3%
Simplified68.3%
if -4.4999999999999999e83 < y < 9e8Initial program 99.2%
Taylor expanded in z around inf 93.5%
Taylor expanded in x around 0 94.2%
+-commutative94.2%
Simplified94.2%
if 3.1999999999999998e164 < y Initial program 49.3%
Taylor expanded in x around 0 21.1%
*-commutative21.1%
associate-/l*71.8%
Applied egg-rr71.8%
Final simplification84.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y (- z)))))
(if (<= y -8.5e+84)
t_0
(if (<= y 1700000000.0)
(+ y (/ x z))
(if (<= y 3e+164) t_0 (* z (/ y z)))))))
double code(double x, double y, double z) {
double t_0 = x * (y / -z);
double tmp;
if (y <= -8.5e+84) {
tmp = t_0;
} else if (y <= 1700000000.0) {
tmp = y + (x / z);
} else if (y <= 3e+164) {
tmp = t_0;
} else {
tmp = z * (y / 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) :: t_0
real(8) :: tmp
t_0 = x * (y / -z)
if (y <= (-8.5d+84)) then
tmp = t_0
else if (y <= 1700000000.0d0) then
tmp = y + (x / z)
else if (y <= 3d+164) then
tmp = t_0
else
tmp = z * (y / z)
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 (y <= -8.5e+84) {
tmp = t_0;
} else if (y <= 1700000000.0) {
tmp = y + (x / z);
} else if (y <= 3e+164) {
tmp = t_0;
} else {
tmp = z * (y / z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / -z) tmp = 0 if y <= -8.5e+84: tmp = t_0 elif y <= 1700000000.0: tmp = y + (x / z) elif y <= 3e+164: tmp = t_0 else: tmp = z * (y / z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y / Float64(-z))) tmp = 0.0 if (y <= -8.5e+84) tmp = t_0; elseif (y <= 1700000000.0) tmp = Float64(y + Float64(x / z)); elseif (y <= 3e+164) tmp = t_0; else tmp = Float64(z * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y / -z); tmp = 0.0; if (y <= -8.5e+84) tmp = t_0; elseif (y <= 1700000000.0) tmp = y + (x / z); elseif (y <= 3e+164) tmp = t_0; else tmp = z * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+84], t$95$0, If[LessEqual[y, 1700000000.0], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+164], t$95$0, N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{-z}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+84}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1700000000:\\
\;\;\;\;y + \frac{x}{z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+164}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -8.5000000000000008e84 or 1.7e9 < y < 3.00000000000000001e164Initial program 83.0%
Taylor expanded in x around inf 60.0%
associate-/l*59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
Taylor expanded in y around inf 59.0%
neg-mul-159.0%
Simplified59.0%
if -8.5000000000000008e84 < y < 1.7e9Initial program 99.2%
Taylor expanded in z around inf 93.5%
Taylor expanded in x around 0 94.2%
+-commutative94.2%
Simplified94.2%
if 3.00000000000000001e164 < y Initial program 49.3%
Taylor expanded in x around 0 21.1%
*-commutative21.1%
associate-/l*71.8%
Applied egg-rr71.8%
Final simplification81.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -50.0) (not (<= y 1.0))) (* y (- 1.0 (/ x z))) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -50.0) || !(y <= 1.0)) {
tmp = y * (1.0 - (x / 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 <= (-50.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = y * (1.0d0 - (x / 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 <= -50.0) || !(y <= 1.0)) {
tmp = y * (1.0 - (x / z));
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -50.0) or not (y <= 1.0): tmp = y * (1.0 - (x / z)) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -50.0) || !(y <= 1.0)) tmp = Float64(y * Float64(1.0 - Float64(x / z))); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -50.0) || ~((y <= 1.0))) tmp = y * (1.0 - (x / z)); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -50.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(y * N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -50 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;y \cdot \left(1 - \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
if y < -50 or 1 < y Initial program 79.5%
Taylor expanded in y around inf 78.1%
associate-/l*98.4%
div-sub98.4%
*-inverses98.4%
Simplified98.4%
if -50 < y < 1Initial program 99.9%
Taylor expanded in z around inf 99.3%
Taylor expanded in x around 0 99.3%
+-commutative99.3%
Simplified99.3%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.6e+25) (not (<= x 2.9e+144))) (* x (/ (- 1.0 y) z)) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.6e+25) || !(x <= 2.9e+144)) {
tmp = x * ((1.0 - 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 ((x <= (-5.6d+25)) .or. (.not. (x <= 2.9d+144))) then
tmp = x * ((1.0d0 - 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 ((x <= -5.6e+25) || !(x <= 2.9e+144)) {
tmp = x * ((1.0 - y) / z);
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.6e+25) or not (x <= 2.9e+144): tmp = x * ((1.0 - y) / z) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.6e+25) || !(x <= 2.9e+144)) tmp = Float64(x * Float64(Float64(1.0 - y) / z)); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.6e+25) || ~((x <= 2.9e+144))) tmp = x * ((1.0 - y) / z); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.6e+25], N[Not[LessEqual[x, 2.9e+144]], $MachinePrecision]], N[(x * N[(N[(1.0 - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+25} \lor \neg \left(x \leq 2.9 \cdot 10^{+144}\right):\\
\;\;\;\;x \cdot \frac{1 - y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
if x < -5.6000000000000003e25 or 2.89999999999999998e144 < x Initial program 85.0%
Taylor expanded in x around inf 82.5%
associate-/l*89.9%
mul-1-neg89.9%
unsub-neg89.9%
Simplified89.9%
if -5.6000000000000003e25 < x < 2.89999999999999998e144Initial program 92.6%
Taylor expanded in z around inf 75.1%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
Simplified82.4%
Final simplification85.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.8e-7) (not (<= y 0.00033))) (* z (/ y z)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.8e-7) || !(y <= 0.00033)) {
tmp = z * (y / z);
} else {
tmp = 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.8d-7)) .or. (.not. (y <= 0.00033d0))) then
tmp = z * (y / z)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.8e-7) || !(y <= 0.00033)) {
tmp = z * (y / z);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.8e-7) or not (y <= 0.00033): tmp = z * (y / z) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.8e-7) || !(y <= 0.00033)) tmp = Float64(z * Float64(y / z)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.8e-7) || ~((y <= 0.00033))) tmp = z * (y / z); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.8e-7], N[Not[LessEqual[y, 0.00033]], $MachinePrecision]], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-7} \lor \neg \left(y \leq 0.00033\right):\\
\;\;\;\;z \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -1.79999999999999997e-7 or 3.3e-4 < y Initial program 79.7%
Taylor expanded in x around 0 31.6%
*-commutative31.6%
associate-/l*49.9%
Applied egg-rr49.9%
if -1.79999999999999997e-7 < y < 3.3e-4Initial program 99.9%
Taylor expanded in y around 0 76.7%
Final simplification63.1%
(FPCore (x y z) :precision binary64 (if (<= y -1.4e-7) y (if (<= y 0.00033) (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.4e-7) {
tmp = y;
} else if (y <= 0.00033) {
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 (y <= (-1.4d-7)) then
tmp = y
else if (y <= 0.00033d0) 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 (y <= -1.4e-7) {
tmp = y;
} else if (y <= 0.00033) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.4e-7: tmp = y elif y <= 0.00033: tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.4e-7) tmp = y; elseif (y <= 0.00033) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.4e-7) tmp = y; elseif (y <= 0.00033) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.4e-7], y, If[LessEqual[y, 0.00033], N[(x / z), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-7}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 0.00033:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.4000000000000001e-7 or 3.3e-4 < y Initial program 79.7%
Taylor expanded in x around 0 46.0%
if -1.4000000000000001e-7 < y < 3.3e-4Initial program 99.9%
Taylor expanded in y around 0 76.7%
(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 89.6%
Taylor expanded in z around inf 66.5%
Taylor expanded in x around 0 73.9%
+-commutative73.9%
Simplified73.9%
Final simplification73.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 89.6%
Taylor expanded in x around 0 35.4%
(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 2024131
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:alt
(! :herbie-platform default (- (+ y (/ x z)) (/ y (/ z x))))
(/ (+ x (* y (- z x))) z))