\[\left(0 < x \land x < 1\right) \land y < 1\]
Math FPCore C Java Python Julia MATLAB Wolfram TeX \[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}
\]
↓
\[{\left(\frac{\mathsf{hypot}\left(x, y\right)}{\frac{x - y}{\mathsf{hypot}\left(x, y\right)} \cdot \left(x + y\right)}\right)}^{-1}
\]
(FPCore (x y) :precision binary64 (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) ↓
(FPCore (x y)
:precision binary64
(pow (/ (hypot x y) (* (/ (- x y) (hypot x y)) (+ x y))) -1.0)) double code(double x, double y) {
return ((x - y) * (x + y)) / ((x * x) + (y * y));
}
↓
double code(double x, double y) {
return pow((hypot(x, y) / (((x - y) / hypot(x, y)) * (x + y))), -1.0);
}
public static double code(double x, double y) {
return ((x - y) * (x + y)) / ((x * x) + (y * y));
}
↓
public static double code(double x, double y) {
return Math.pow((Math.hypot(x, y) / (((x - y) / Math.hypot(x, y)) * (x + y))), -1.0);
}
def code(x, y):
return ((x - y) * (x + y)) / ((x * x) + (y * y))
↓
def code(x, y):
return math.pow((math.hypot(x, y) / (((x - y) / math.hypot(x, y)) * (x + y))), -1.0)
function code(x, y)
return Float64(Float64(Float64(x - y) * Float64(x + y)) / Float64(Float64(x * x) + Float64(y * y)))
end
↓
function code(x, y)
return Float64(hypot(x, y) / Float64(Float64(Float64(x - y) / hypot(x, y)) * Float64(x + y))) ^ -1.0
end
function tmp = code(x, y)
tmp = ((x - y) * (x + y)) / ((x * x) + (y * y));
end
↓
function tmp = code(x, y)
tmp = (hypot(x, y) / (((x - y) / hypot(x, y)) * (x + y))) ^ -1.0;
end
code[x_, y_] := N[(N[(N[(x - y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[Power[N[(N[Sqrt[x ^ 2 + y ^ 2], $MachinePrecision] / N[(N[(N[(x - y), $MachinePrecision] / N[Sqrt[x ^ 2 + y ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]
\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}
↓
{\left(\frac{\mathsf{hypot}\left(x, y\right)}{\frac{x - y}{\mathsf{hypot}\left(x, y\right)} \cdot \left(x + y\right)}\right)}^{-1}
Alternatives Alternative 1 Error 0.0 Cost 13632
\[\frac{x + y}{\mathsf{hypot}\left(x, y\right) \cdot \frac{\mathsf{hypot}\left(x, y\right)}{x - y}}
\]
Alternative 2 Error 4.8 Cost 7372
\[\begin{array}{l}
t_0 := \left(x - y\right) \cdot \left(x + y\right)\\
\mathbf{if}\;y \leq -0.006349111880085442:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;\frac{t_0}{\frac{x \cdot x}{x - y} \cdot \frac{x \cdot x}{x + y} - \frac{y \cdot y}{x - y} \cdot \frac{y \cdot y}{x + y}}\\
\mathbf{elif}\;y \leq 3.817406963700337 \cdot 10^{-184}:\\
\;\;\;\;\mathsf{fma}\left(-2, \frac{y}{x} \cdot \frac{y}{x}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{x \cdot x + y \cdot y}\\
\end{array}
\]
Alternative 3 Error 4.8 Cost 2760
\[\begin{array}{l}
t_0 := \left(x - y\right) \cdot \left(x + y\right)\\
\mathbf{if}\;y \leq -0.006349111880085442:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;\frac{t_0}{\frac{x \cdot x}{x - y} \cdot \frac{x \cdot x}{x + y} - \frac{y \cdot y}{x - y} \cdot \frac{y \cdot y}{x + y}}\\
\mathbf{elif}\;y \leq 3.817406963700337 \cdot 10^{-184}:\\
\;\;\;\;\left(1 + \frac{y}{x} \cdot \left(-1 - \frac{y}{x}\right)\right) + \frac{y}{x} \cdot \left(1 - \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{x \cdot x + y \cdot y}\\
\end{array}
\]
Alternative 4 Error 4.8 Cost 1740
\[\begin{array}{l}
t_0 := \frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\\
\mathbf{if}\;y \leq -1.1588890312746165 \cdot 10^{+155}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.817406963700337 \cdot 10^{-184}:\\
\;\;\;\;\left(1 + \frac{y}{x} \cdot \left(-1 - \frac{y}{x}\right)\right) + \frac{y}{x} \cdot \left(1 - \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 4.9 Cost 1356
\[\begin{array}{l}
t_0 := \frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\\
\mathbf{if}\;y \leq -1.1588890312746165 \cdot 10^{+155}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.1743190104364287 \cdot 10^{-189}:\\
\;\;\;\;1 + y \cdot \frac{-2}{\frac{x}{\frac{y}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 11.2 Cost 968
\[\begin{array}{l}
t_0 := -1 + \frac{\frac{2}{y}}{\frac{\frac{y}{x}}{x}}\\
\mathbf{if}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 4.18747732620905 \cdot 10^{-105}:\\
\;\;\;\;1 - \frac{y}{x \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 11.2 Cost 968
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;-1 + \frac{\frac{2}{y}}{\frac{\frac{y}{x}}{x}}\\
\mathbf{elif}\;y \leq 4.18747732620905 \cdot 10^{-105}:\\
\;\;\;\;1 - \frac{y}{x \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot \left(x + y\right)}{y \cdot y}\\
\end{array}
\]
Alternative 8 Error 11.1 Cost 968
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;-1 + \frac{\frac{2}{y}}{\frac{\frac{y}{x}}{x}}\\
\mathbf{elif}\;y \leq 4.18747732620905 \cdot 10^{-105}:\\
\;\;\;\;1 + y \cdot \frac{-2}{\frac{x}{\frac{y}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot \left(x + y\right)}{y \cdot y}\\
\end{array}
\]
Alternative 9 Error 11.5 Cost 840
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq 4.18747732620905 \cdot 10^{-105}:\\
\;\;\;\;1 - \frac{y}{x \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\]
Alternative 10 Error 11.7 Cost 328
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.632794257281874 \cdot 10^{-161}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq 4.18747732620905 \cdot 10^{-105}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\]
Alternative 11 Error 21.6 Cost 64
\[-1
\]