\[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 2 \cdot 10^{+132}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \left(y \cdot \frac{8}{x}\right)\\
\end{array}
\]
(FPCore (x y)
:precision binary64
(/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y))))
↓
(FPCore (x y)
:precision binary64
(if (<= (* x x) 2e+132)
(fma 0.5 (* (/ x y) (/ x y)) -1.0)
(- 1.0 (* (/ y x) (* y (/ 8.0 x))))))
double code(double x, double y) {
return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
}
↓
double code(double x, double y) {
double tmp;
if ((x * x) <= 2e+132) {
tmp = fma(0.5, ((x / y) * (x / y)), -1.0);
} else {
tmp = 1.0 - ((y / x) * (y * (8.0 / x)));
}
return tmp;
}
function code(x, y)
return Float64(Float64(Float64(x * x) - Float64(Float64(y * 4.0) * y)) / Float64(Float64(x * x) + Float64(Float64(y * 4.0) * y)))
end
↓
function code(x, y)
tmp = 0.0
if (Float64(x * x) <= 2e+132)
tmp = fma(0.5, Float64(Float64(x / y) * Float64(x / y)), -1.0);
else
tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(y * Float64(8.0 / x))));
end
return tmp
end
code[x_, y_] := N[(N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := If[LessEqual[N[(x * x), $MachinePrecision], 2e+132], N[(0.5 * N[(N[(x / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(y * N[(8.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
↓
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 2 \cdot 10^{+132}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \left(y \cdot \frac{8}{x}\right)\\
\end{array}