
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
double code(double x, double y, double z) {
return (x - y) / (z - 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 - y) / (z - y)
end function
public static double code(double x, double y, double z) {
return (x - y) / (z - y);
}
def code(x, y, z): return (x - y) / (z - y)
function code(x, y, z) return Float64(Float64(x - y) / Float64(z - y)) end
function tmp = code(x, y, z) tmp = (x - y) / (z - y); end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
double code(double x, double y, double z) {
return (x - y) / (z - 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 - y) / (z - y)
end function
public static double code(double x, double y, double z) {
return (x - y) / (z - y);
}
def code(x, y, z): return (x - y) / (z - y)
function code(x, y, z) return Float64(Float64(x - y) / Float64(z - y)) end
function tmp = code(x, y, z) tmp = (x - y) / (z - y); end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
double code(double x, double y, double z) {
return (x - y) / (z - 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 - y) / (z - y)
end function
public static double code(double x, double y, double z) {
return (x - y) / (z - y);
}
def code(x, y, z): return (x - y) / (z - y)
function code(x, y, z) return Float64(Float64(x - y) / Float64(z - y)) end
function tmp = code(x, y, z) tmp = (x - y) / (z - y); end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ y (- z))))
(if (<= y -4.6e+77)
1.0
(if (<= y -2.1e-34)
t_0
(if (<= y 4e-76)
(/ x z)
(if (<= y 4500.0)
(/ x (- y))
(if (<= y 3e+50) 1.0 (if (<= y 2.5e+101) t_0 1.0))))))))
double code(double x, double y, double z) {
double t_0 = y / -z;
double tmp;
if (y <= -4.6e+77) {
tmp = 1.0;
} else if (y <= -2.1e-34) {
tmp = t_0;
} else if (y <= 4e-76) {
tmp = x / z;
} else if (y <= 4500.0) {
tmp = x / -y;
} else if (y <= 3e+50) {
tmp = 1.0;
} else if (y <= 2.5e+101) {
tmp = t_0;
} else {
tmp = 1.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 = y / -z
if (y <= (-4.6d+77)) then
tmp = 1.0d0
else if (y <= (-2.1d-34)) then
tmp = t_0
else if (y <= 4d-76) then
tmp = x / z
else if (y <= 4500.0d0) then
tmp = x / -y
else if (y <= 3d+50) then
tmp = 1.0d0
else if (y <= 2.5d+101) then
tmp = t_0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y / -z;
double tmp;
if (y <= -4.6e+77) {
tmp = 1.0;
} else if (y <= -2.1e-34) {
tmp = t_0;
} else if (y <= 4e-76) {
tmp = x / z;
} else if (y <= 4500.0) {
tmp = x / -y;
} else if (y <= 3e+50) {
tmp = 1.0;
} else if (y <= 2.5e+101) {
tmp = t_0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): t_0 = y / -z tmp = 0 if y <= -4.6e+77: tmp = 1.0 elif y <= -2.1e-34: tmp = t_0 elif y <= 4e-76: tmp = x / z elif y <= 4500.0: tmp = x / -y elif y <= 3e+50: tmp = 1.0 elif y <= 2.5e+101: tmp = t_0 else: tmp = 1.0 return tmp
function code(x, y, z) t_0 = Float64(y / Float64(-z)) tmp = 0.0 if (y <= -4.6e+77) tmp = 1.0; elseif (y <= -2.1e-34) tmp = t_0; elseif (y <= 4e-76) tmp = Float64(x / z); elseif (y <= 4500.0) tmp = Float64(x / Float64(-y)); elseif (y <= 3e+50) tmp = 1.0; elseif (y <= 2.5e+101) tmp = t_0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y / -z; tmp = 0.0; if (y <= -4.6e+77) tmp = 1.0; elseif (y <= -2.1e-34) tmp = t_0; elseif (y <= 4e-76) tmp = x / z; elseif (y <= 4500.0) tmp = x / -y; elseif (y <= 3e+50) tmp = 1.0; elseif (y <= 2.5e+101) tmp = t_0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / (-z)), $MachinePrecision]}, If[LessEqual[y, -4.6e+77], 1.0, If[LessEqual[y, -2.1e-34], t$95$0, If[LessEqual[y, 4e-76], N[(x / z), $MachinePrecision], If[LessEqual[y, 4500.0], N[(x / (-y)), $MachinePrecision], If[LessEqual[y, 3e+50], 1.0, If[LessEqual[y, 2.5e+101], t$95$0, 1.0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{-z}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-34}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-76}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 4500:\\
\;\;\;\;\frac{x}{-y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+50}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.5999999999999999e77 or 4500 < y < 2.9999999999999998e50 or 2.49999999999999994e101 < y Initial program 100.0%
Taylor expanded in y around inf 65.8%
if -4.5999999999999999e77 < y < -2.1000000000000001e-34 or 2.9999999999999998e50 < y < 2.49999999999999994e101Initial program 100.0%
Taylor expanded in z around inf 57.1%
Taylor expanded in x around 0 48.8%
neg-mul-148.8%
distribute-neg-frac248.8%
Simplified48.8%
if -2.1000000000000001e-34 < y < 3.99999999999999971e-76Initial program 100.0%
Taylor expanded in y around 0 71.4%
if 3.99999999999999971e-76 < y < 4500Initial program 99.9%
Taylor expanded in z around 0 58.9%
div-sub58.9%
sub-neg58.9%
*-inverses58.9%
metadata-eval58.9%
distribute-lft-in58.9%
metadata-eval58.9%
+-commutative58.9%
mul-1-neg58.9%
unsub-neg58.9%
Simplified58.9%
Taylor expanded in x around inf 48.5%
associate-*r/48.5%
mul-1-neg48.5%
Simplified48.5%
Final simplification64.9%
(FPCore (x y z) :precision binary64 (if (<= y -4.1e+77) 1.0 (if (<= y -3.75e-34) (/ y (- z)) (if (<= y 4.8e-26) (/ x z) 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.1e+77) {
tmp = 1.0;
} else if (y <= -3.75e-34) {
tmp = y / -z;
} else if (y <= 4.8e-26) {
tmp = x / z;
} else {
tmp = 1.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) :: tmp
if (y <= (-4.1d+77)) then
tmp = 1.0d0
else if (y <= (-3.75d-34)) then
tmp = y / -z
else if (y <= 4.8d-26) then
tmp = x / z
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -4.1e+77) {
tmp = 1.0;
} else if (y <= -3.75e-34) {
tmp = y / -z;
} else if (y <= 4.8e-26) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.1e+77: tmp = 1.0 elif y <= -3.75e-34: tmp = y / -z elif y <= 4.8e-26: tmp = x / z else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.1e+77) tmp = 1.0; elseif (y <= -3.75e-34) tmp = Float64(y / Float64(-z)); elseif (y <= 4.8e-26) tmp = Float64(x / z); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -4.1e+77) tmp = 1.0; elseif (y <= -3.75e-34) tmp = y / -z; elseif (y <= 4.8e-26) tmp = x / z; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.1e+77], 1.0, If[LessEqual[y, -3.75e-34], N[(y / (-z)), $MachinePrecision], If[LessEqual[y, 4.8e-26], N[(x / z), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+77}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -3.75 \cdot 10^{-34}:\\
\;\;\;\;\frac{y}{-z}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.1000000000000001e77 or 4.8000000000000002e-26 < y Initial program 100.0%
Taylor expanded in y around inf 58.2%
if -4.1000000000000001e77 < y < -3.7500000000000002e-34Initial program 99.9%
Taylor expanded in z around inf 57.8%
Taylor expanded in x around 0 45.4%
neg-mul-145.4%
distribute-neg-frac245.4%
Simplified45.4%
if -3.7500000000000002e-34 < y < 4.8000000000000002e-26Initial program 100.0%
Taylor expanded in y around 0 67.8%
Final simplification61.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.85e-7) (not (<= y 2.5e-76))) (- 1.0 (/ x y)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.85e-7) || !(y <= 2.5e-76)) {
tmp = 1.0 - (x / y);
} 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.85d-7)) .or. (.not. (y <= 2.5d-76))) then
tmp = 1.0d0 - (x / y)
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.85e-7) || !(y <= 2.5e-76)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.85e-7) or not (y <= 2.5e-76): tmp = 1.0 - (x / y) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.85e-7) || !(y <= 2.5e-76)) tmp = Float64(1.0 - Float64(x / y)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.85e-7) || ~((y <= 2.5e-76))) tmp = 1.0 - (x / y); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.85e-7], N[Not[LessEqual[y, 2.5e-76]], $MachinePrecision]], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-7} \lor \neg \left(y \leq 2.5 \cdot 10^{-76}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -1.85000000000000002e-7 or 2.4999999999999999e-76 < y Initial program 100.0%
Taylor expanded in z around 0 72.3%
div-sub72.3%
sub-neg72.3%
*-inverses72.3%
metadata-eval72.3%
distribute-lft-in72.3%
metadata-eval72.3%
+-commutative72.3%
mul-1-neg72.3%
unsub-neg72.3%
Simplified72.3%
if -1.85000000000000002e-7 < y < 2.4999999999999999e-76Initial program 100.0%
Taylor expanded in y around 0 69.3%
Final simplification71.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.35e+83) (not (<= y 1e-24))) (- 1.0 (/ x y)) (/ x (- z y))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.35e+83) || !(y <= 1e-24)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / (z - 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 <= (-2.35d+83)) .or. (.not. (y <= 1d-24))) then
tmp = 1.0d0 - (x / y)
else
tmp = x / (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.35e+83) || !(y <= 1e-24)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / (z - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.35e+83) or not (y <= 1e-24): tmp = 1.0 - (x / y) else: tmp = x / (z - y) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.35e+83) || !(y <= 1e-24)) tmp = Float64(1.0 - Float64(x / y)); else tmp = Float64(x / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.35e+83) || ~((y <= 1e-24))) tmp = 1.0 - (x / y); else tmp = x / (z - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.35e+83], N[Not[LessEqual[y, 1e-24]], $MachinePrecision]], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+83} \lor \neg \left(y \leq 10^{-24}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z - y}\\
\end{array}
\end{array}
if y < -2.3499999999999999e83 or 9.99999999999999924e-25 < y Initial program 100.0%
Taylor expanded in z around 0 77.4%
div-sub77.4%
sub-neg77.4%
*-inverses77.4%
metadata-eval77.4%
distribute-lft-in77.4%
metadata-eval77.4%
+-commutative77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified77.4%
if -2.3499999999999999e83 < y < 9.99999999999999924e-25Initial program 100.0%
Taylor expanded in x around inf 80.9%
Final simplification79.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.7e-41) (not (<= x 2.9e+49))) (/ x (- z y)) (/ y (- y z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-41) || !(x <= 2.9e+49)) {
tmp = x / (z - y);
} else {
tmp = y / (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) :: tmp
if ((x <= (-3.7d-41)) .or. (.not. (x <= 2.9d+49))) then
tmp = x / (z - y)
else
tmp = y / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-41) || !(x <= 2.9e+49)) {
tmp = x / (z - y);
} else {
tmp = y / (y - z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.7e-41) or not (x <= 2.9e+49): tmp = x / (z - y) else: tmp = y / (y - z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.7e-41) || !(x <= 2.9e+49)) tmp = Float64(x / Float64(z - y)); else tmp = Float64(y / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.7e-41) || ~((x <= 2.9e+49))) tmp = x / (z - y); else tmp = y / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.7e-41], N[Not[LessEqual[x, 2.9e+49]], $MachinePrecision]], N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-41} \lor \neg \left(x \leq 2.9 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y - z}\\
\end{array}
\end{array}
if x < -3.7000000000000002e-41 or 2.9e49 < x Initial program 100.0%
Taylor expanded in x around inf 82.4%
if -3.7000000000000002e-41 < x < 2.9e49Initial program 100.0%
Taylor expanded in x around 0 81.5%
neg-mul-181.5%
distribute-neg-frac81.5%
Simplified81.5%
frac-2neg81.5%
div-inv81.3%
remove-double-neg81.3%
sub-neg81.3%
distribute-neg-in81.3%
remove-double-neg81.3%
Applied egg-rr81.3%
associate-*r/81.5%
*-rgt-identity81.5%
+-commutative81.5%
unsub-neg81.5%
Simplified81.5%
Final simplification81.9%
(FPCore (x y z) :precision binary64 (if (<= y -65000000.0) 1.0 (if (<= y 1.6e-25) (/ x z) 1.0)))
double code(double x, double y, double z) {
double tmp;
if (y <= -65000000.0) {
tmp = 1.0;
} else if (y <= 1.6e-25) {
tmp = x / z;
} else {
tmp = 1.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) :: tmp
if (y <= (-65000000.0d0)) then
tmp = 1.0d0
else if (y <= 1.6d-25) then
tmp = x / z
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -65000000.0) {
tmp = 1.0;
} else if (y <= 1.6e-25) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -65000000.0: tmp = 1.0 elif y <= 1.6e-25: tmp = x / z else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -65000000.0) tmp = 1.0; elseif (y <= 1.6e-25) tmp = Float64(x / z); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -65000000.0) tmp = 1.0; elseif (y <= 1.6e-25) tmp = x / z; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -65000000.0], 1.0, If[LessEqual[y, 1.6e-25], N[(x / z), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -65000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -6.5e7 or 1.6000000000000001e-25 < y Initial program 100.0%
Taylor expanded in y around inf 53.7%
if -6.5e7 < y < 1.6000000000000001e-25Initial program 100.0%
Taylor expanded in y around 0 65.0%
Final simplification59.1%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in y around inf 31.3%
Final simplification31.3%
(FPCore (x y z) :precision binary64 (- (/ x (- z y)) (/ y (- z y))))
double code(double x, double y, double z) {
return (x / (z - y)) - (y / (z - 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 / (z - y)) - (y / (z - y))
end function
public static double code(double x, double y, double z) {
return (x / (z - y)) - (y / (z - y));
}
def code(x, y, z): return (x / (z - y)) - (y / (z - y))
function code(x, y, z) return Float64(Float64(x / Float64(z - y)) - Float64(y / Float64(z - y))) end
function tmp = code(x, y, z) tmp = (x / (z - y)) - (y / (z - y)); end
code[x_, y_, z_] := N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{z - y} - \frac{y}{z - y}
\end{array}
herbie shell --seed 2024055
(FPCore (x y z)
:name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
:precision binary64
:alt
(- (/ x (- z y)) (/ y (- z y)))
(/ (- x y) (- z y)))