
(FPCore (x y) :precision binary64 (/ (+ x y) (- x y)))
double code(double x, double y) {
return (x + y) / (x - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x + y) / (x - y)
end function
public static double code(double x, double y) {
return (x + y) / (x - y);
}
def code(x, y): return (x + y) / (x - y)
function code(x, y) return Float64(Float64(x + y) / Float64(x - y)) end
function tmp = code(x, y) tmp = (x + y) / (x - y); end
code[x_, y_] := N[(N[(x + y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y}{x - y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (+ x y) (- x y)))
double code(double x, double y) {
return (x + y) / (x - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x + y) / (x - y)
end function
public static double code(double x, double y) {
return (x + y) / (x - y);
}
def code(x, y): return (x + y) / (x - y)
function code(x, y) return Float64(Float64(x + y) / Float64(x - y)) end
function tmp = code(x, y) tmp = (x + y) / (x - y); end
code[x_, y_] := N[(N[(x + y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y}{x - y}
\end{array}
(FPCore (x y) :precision binary64 (/ (+ x y) (- x y)))
double code(double x, double y) {
return (x + y) / (x - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x + y) / (x - y)
end function
public static double code(double x, double y) {
return (x + y) / (x - y);
}
def code(x, y): return (x + y) / (x - y)
function code(x, y) return Float64(Float64(x + y) / Float64(x - y)) end
function tmp = code(x, y) tmp = (x + y) / (x - y); end
code[x_, y_] := N[(N[(x + y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y}{x - y}
\end{array}
Initial program 99.9%
(FPCore (x y) :precision binary64 (if (or (<= x -2300000000.0) (not (<= x 4.9e+41))) (+ 1.0 (* 2.0 (/ y x))) (+ (* -2.0 (/ x y)) -1.0)))
double code(double x, double y) {
double tmp;
if ((x <= -2300000000.0) || !(x <= 4.9e+41)) {
tmp = 1.0 + (2.0 * (y / x));
} else {
tmp = (-2.0 * (x / y)) + -1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-2300000000.0d0)) .or. (.not. (x <= 4.9d+41))) then
tmp = 1.0d0 + (2.0d0 * (y / x))
else
tmp = ((-2.0d0) * (x / y)) + (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -2300000000.0) || !(x <= 4.9e+41)) {
tmp = 1.0 + (2.0 * (y / x));
} else {
tmp = (-2.0 * (x / y)) + -1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -2300000000.0) or not (x <= 4.9e+41): tmp = 1.0 + (2.0 * (y / x)) else: tmp = (-2.0 * (x / y)) + -1.0 return tmp
function code(x, y) tmp = 0.0 if ((x <= -2300000000.0) || !(x <= 4.9e+41)) tmp = Float64(1.0 + Float64(2.0 * Float64(y / x))); else tmp = Float64(Float64(-2.0 * Float64(x / y)) + -1.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -2300000000.0) || ~((x <= 4.9e+41))) tmp = 1.0 + (2.0 * (y / x)); else tmp = (-2.0 * (x / y)) + -1.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -2300000000.0], N[Not[LessEqual[x, 4.9e+41]], $MachinePrecision]], N[(1.0 + N[(2.0 * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2300000000 \lor \neg \left(x \leq 4.9 \cdot 10^{+41}\right):\\
\;\;\;\;1 + 2 \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{y} + -1\\
\end{array}
\end{array}
if x < -2.3e9 or 4.8999999999999999e41 < x Initial program 99.9%
Taylor expanded in y around 0 79.5%
if -2.3e9 < x < 4.8999999999999999e41Initial program 100.0%
Taylor expanded in x around 0 78.9%
Final simplification79.2%
(FPCore (x y) :precision binary64 (if (or (<= x -125000000000.0) (not (<= x 1.66e+38))) (+ 1.0 (* 2.0 (/ y x))) (- -1.0 (/ x y))))
double code(double x, double y) {
double tmp;
if ((x <= -125000000000.0) || !(x <= 1.66e+38)) {
tmp = 1.0 + (2.0 * (y / x));
} else {
tmp = -1.0 - (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-125000000000.0d0)) .or. (.not. (x <= 1.66d+38))) then
tmp = 1.0d0 + (2.0d0 * (y / x))
else
tmp = (-1.0d0) - (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -125000000000.0) || !(x <= 1.66e+38)) {
tmp = 1.0 + (2.0 * (y / x));
} else {
tmp = -1.0 - (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -125000000000.0) or not (x <= 1.66e+38): tmp = 1.0 + (2.0 * (y / x)) else: tmp = -1.0 - (x / y) return tmp
function code(x, y) tmp = 0.0 if ((x <= -125000000000.0) || !(x <= 1.66e+38)) tmp = Float64(1.0 + Float64(2.0 * Float64(y / x))); else tmp = Float64(-1.0 - Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -125000000000.0) || ~((x <= 1.66e+38))) tmp = 1.0 + (2.0 * (y / x)); else tmp = -1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -125000000000.0], N[Not[LessEqual[x, 1.66e+38]], $MachinePrecision]], N[(1.0 + N[(2.0 * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -125000000000 \lor \neg \left(x \leq 1.66 \cdot 10^{+38}\right):\\
\;\;\;\;1 + 2 \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;-1 - \frac{x}{y}\\
\end{array}
\end{array}
if x < -1.25e11 or 1.66e38 < x Initial program 99.9%
Taylor expanded in y around 0 79.5%
if -1.25e11 < x < 1.66e38Initial program 100.0%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
Simplified78.6%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
neg-sub078.6%
associate--r+78.6%
+-commutative78.6%
associate--r+78.6%
metadata-eval78.6%
Simplified78.6%
Final simplification79.0%
(FPCore (x y) :precision binary64 (if (or (<= x -17000000000.0) (not (<= x 7.5e+40))) (+ 1.0 (/ y x)) (- -1.0 (/ x y))))
double code(double x, double y) {
double tmp;
if ((x <= -17000000000.0) || !(x <= 7.5e+40)) {
tmp = 1.0 + (y / x);
} else {
tmp = -1.0 - (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-17000000000.0d0)) .or. (.not. (x <= 7.5d+40))) then
tmp = 1.0d0 + (y / x)
else
tmp = (-1.0d0) - (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -17000000000.0) || !(x <= 7.5e+40)) {
tmp = 1.0 + (y / x);
} else {
tmp = -1.0 - (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -17000000000.0) or not (x <= 7.5e+40): tmp = 1.0 + (y / x) else: tmp = -1.0 - (x / y) return tmp
function code(x, y) tmp = 0.0 if ((x <= -17000000000.0) || !(x <= 7.5e+40)) tmp = Float64(1.0 + Float64(y / x)); else tmp = Float64(-1.0 - Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -17000000000.0) || ~((x <= 7.5e+40))) tmp = 1.0 + (y / x); else tmp = -1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -17000000000.0], N[Not[LessEqual[x, 7.5e+40]], $MachinePrecision]], N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision], N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -17000000000 \lor \neg \left(x \leq 7.5 \cdot 10^{+40}\right):\\
\;\;\;\;1 + \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;-1 - \frac{x}{y}\\
\end{array}
\end{array}
if x < -1.7e10 or 7.4999999999999996e40 < x Initial program 99.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in x around inf 78.8%
if -1.7e10 < x < 7.4999999999999996e40Initial program 100.0%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
Simplified78.6%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
neg-sub078.6%
associate--r+78.6%
+-commutative78.6%
associate--r+78.6%
metadata-eval78.6%
Simplified78.6%
Final simplification78.7%
(FPCore (x y) :precision binary64 (if (or (<= x -95000000000.0) (not (<= x 1.62e+38))) (+ 1.0 (/ y x)) -1.0))
double code(double x, double y) {
double tmp;
if ((x <= -95000000000.0) || !(x <= 1.62e+38)) {
tmp = 1.0 + (y / x);
} else {
tmp = -1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-95000000000.0d0)) .or. (.not. (x <= 1.62d+38))) then
tmp = 1.0d0 + (y / x)
else
tmp = -1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -95000000000.0) || !(x <= 1.62e+38)) {
tmp = 1.0 + (y / x);
} else {
tmp = -1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -95000000000.0) or not (x <= 1.62e+38): tmp = 1.0 + (y / x) else: tmp = -1.0 return tmp
function code(x, y) tmp = 0.0 if ((x <= -95000000000.0) || !(x <= 1.62e+38)) tmp = Float64(1.0 + Float64(y / x)); else tmp = -1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -95000000000.0) || ~((x <= 1.62e+38))) tmp = 1.0 + (y / x); else tmp = -1.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -95000000000.0], N[Not[LessEqual[x, 1.62e+38]], $MachinePrecision]], N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision], -1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -95000000000 \lor \neg \left(x \leq 1.62 \cdot 10^{+38}\right):\\
\;\;\;\;1 + \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\end{array}
if x < -9.5e10 or 1.62000000000000001e38 < x Initial program 99.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in x around inf 78.8%
if -9.5e10 < x < 1.62000000000000001e38Initial program 100.0%
Taylor expanded in x around 0 77.8%
Final simplification78.2%
(FPCore (x y) :precision binary64 (if (<= x -5.5e+16) (/ x (- x y)) (if (<= x 1.52e+38) (- -1.0 (/ x y)) (+ 1.0 (/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -5.5e+16) {
tmp = x / (x - y);
} else if (x <= 1.52e+38) {
tmp = -1.0 - (x / y);
} else {
tmp = 1.0 + (y / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-5.5d+16)) then
tmp = x / (x - y)
else if (x <= 1.52d+38) then
tmp = (-1.0d0) - (x / y)
else
tmp = 1.0d0 + (y / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -5.5e+16) {
tmp = x / (x - y);
} else if (x <= 1.52e+38) {
tmp = -1.0 - (x / y);
} else {
tmp = 1.0 + (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.5e+16: tmp = x / (x - y) elif x <= 1.52e+38: tmp = -1.0 - (x / y) else: tmp = 1.0 + (y / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.5e+16) tmp = Float64(x / Float64(x - y)); elseif (x <= 1.52e+38) tmp = Float64(-1.0 - Float64(x / y)); else tmp = Float64(1.0 + Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.5e+16) tmp = x / (x - y); elseif (x <= 1.52e+38) tmp = -1.0 - (x / y); else tmp = 1.0 + (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.5e+16], N[(x / N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.52e+38], N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{x - y}\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{+38}:\\
\;\;\;\;-1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{x}\\
\end{array}
\end{array}
if x < -5.5e16Initial program 99.9%
Taylor expanded in x around inf 76.4%
if -5.5e16 < x < 1.51999999999999996e38Initial program 100.0%
Taylor expanded in x around 0 78.2%
neg-mul-178.2%
Simplified78.2%
Taylor expanded in x around 0 78.2%
neg-mul-178.2%
neg-sub078.2%
associate--r+78.2%
+-commutative78.2%
associate--r+78.2%
metadata-eval78.2%
Simplified78.2%
if 1.51999999999999996e38 < x Initial program 99.9%
Taylor expanded in x around inf 82.5%
Taylor expanded in x around inf 82.5%
(FPCore (x y) :precision binary64 (if (<= x -24000000000.0) (/ x (+ x y)) (if (<= x 2.55e+39) (- -1.0 (/ x y)) (+ 1.0 (/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -24000000000.0) {
tmp = x / (x + y);
} else if (x <= 2.55e+39) {
tmp = -1.0 - (x / y);
} else {
tmp = 1.0 + (y / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-24000000000.0d0)) then
tmp = x / (x + y)
else if (x <= 2.55d+39) then
tmp = (-1.0d0) - (x / y)
else
tmp = 1.0d0 + (y / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -24000000000.0) {
tmp = x / (x + y);
} else if (x <= 2.55e+39) {
tmp = -1.0 - (x / y);
} else {
tmp = 1.0 + (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -24000000000.0: tmp = x / (x + y) elif x <= 2.55e+39: tmp = -1.0 - (x / y) else: tmp = 1.0 + (y / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -24000000000.0) tmp = Float64(x / Float64(x + y)); elseif (x <= 2.55e+39) tmp = Float64(-1.0 - Float64(x / y)); else tmp = Float64(1.0 + Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -24000000000.0) tmp = x / (x + y); elseif (x <= 2.55e+39) tmp = -1.0 - (x / y); else tmp = 1.0 + (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -24000000000.0], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.55e+39], N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -24000000000:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{+39}:\\
\;\;\;\;-1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{x}\\
\end{array}
\end{array}
if x < -2.4e10Initial program 99.9%
Taylor expanded in x around inf 75.6%
div-inv75.4%
sub-neg75.4%
add-sqr-sqrt37.5%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod38.5%
add-sqr-sqrt75.3%
Applied egg-rr75.3%
associate-*r/75.6%
*-rgt-identity75.6%
Simplified75.6%
if -2.4e10 < x < 2.5499999999999999e39Initial program 100.0%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
Simplified78.6%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
neg-sub078.6%
associate--r+78.6%
+-commutative78.6%
associate--r+78.6%
metadata-eval78.6%
Simplified78.6%
if 2.5499999999999999e39 < x Initial program 99.9%
Taylor expanded in x around inf 82.5%
Taylor expanded in x around inf 82.5%
(FPCore (x y) :precision binary64 (if (<= x -1e+14) 1.0 (if (<= x 1.7e+40) -1.0 1.0)))
double code(double x, double y) {
double tmp;
if (x <= -1e+14) {
tmp = 1.0;
} else if (x <= 1.7e+40) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1d+14)) then
tmp = 1.0d0
else if (x <= 1.7d+40) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1e+14) {
tmp = 1.0;
} else if (x <= 1.7e+40) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1e+14: tmp = 1.0 elif x <= 1.7e+40: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= -1e+14) tmp = 1.0; elseif (x <= 1.7e+40) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1e+14) tmp = 1.0; elseif (x <= 1.7e+40) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1e+14], 1.0, If[LessEqual[x, 1.7e+40], -1.0, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+14}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+40}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1e14 or 1.69999999999999994e40 < x Initial program 99.9%
Taylor expanded in x around inf 78.7%
if -1e14 < x < 1.69999999999999994e40Initial program 100.0%
Taylor expanded in x around 0 77.4%
(FPCore (x y) :precision binary64 -1.0)
double code(double x, double y) {
return -1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = -1.0d0
end function
public static double code(double x, double y) {
return -1.0;
}
def code(x, y): return -1.0
function code(x, y) return -1.0 end
function tmp = code(x, y) tmp = -1.0; end
code[x_, y_] := -1.0
\begin{array}{l}
\\
-1
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 51.9%
(FPCore (x y) :precision binary64 (/ 1.0 (- (/ x (+ x y)) (/ y (+ x y)))))
double code(double x, double y) {
return 1.0 / ((x / (x + y)) - (y / (x + y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / ((x / (x + y)) - (y / (x + y)))
end function
public static double code(double x, double y) {
return 1.0 / ((x / (x + y)) - (y / (x + y)));
}
def code(x, y): return 1.0 / ((x / (x + y)) - (y / (x + y)))
function code(x, y) return Float64(1.0 / Float64(Float64(x / Float64(x + y)) - Float64(y / Float64(x + y)))) end
function tmp = code(x, y) tmp = 1.0 / ((x / (x + y)) - (y / (x + y))); end
code[x_, y_] := N[(1.0 / N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{x}{x + y} - \frac{y}{x + y}}
\end{array}
herbie shell --seed 2024170
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:precision binary64
:alt
(! :herbie-platform default (/ 1 (- (/ x (+ x y)) (/ y (+ x y)))))
(/ (+ x y) (- x y)))