\[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
\]
↓
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 4\right)\\
t_1 := \mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
t_2 := \frac{x \cdot x - t_0}{x \cdot x + t_0}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-186}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 8.1 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y)
:precision binary64
(/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y))))
↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y 4.0)))
(t_1 (fma 0.5 (* (/ x y) (/ x y)) -1.0))
(t_2 (/ (- (* x x) t_0) (+ (* x x) t_0))))
(if (<= y -2.1e+125)
t_1
(if (<= y -1.05e-65)
t_2
(if (<= y 1.35e-186) 1.0 (if (<= y 8.1e+96) t_2 t_1))))))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 t_0 = y * (y * 4.0);
double t_1 = fma(0.5, ((x / y) * (x / y)), -1.0);
double t_2 = ((x * x) - t_0) / ((x * x) + t_0);
double tmp;
if (y <= -2.1e+125) {
tmp = t_1;
} else if (y <= -1.05e-65) {
tmp = t_2;
} else if (y <= 1.35e-186) {
tmp = 1.0;
} else if (y <= 8.1e+96) {
tmp = t_2;
} else {
tmp = t_1;
}
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)
t_0 = Float64(y * Float64(y * 4.0))
t_1 = fma(0.5, Float64(Float64(x / y) * Float64(x / y)), -1.0)
t_2 = Float64(Float64(Float64(x * x) - t_0) / Float64(Float64(x * x) + t_0))
tmp = 0.0
if (y <= -2.1e+125)
tmp = t_1;
elseif (y <= -1.05e-65)
tmp = t_2;
elseif (y <= 1.35e-186)
tmp = 1.0;
elseif (y <= 8.1e+96)
tmp = t_2;
else
tmp = t_1;
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_] := Block[{t$95$0 = N[(y * N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(N[(x / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * x), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+125], t$95$1, If[LessEqual[y, -1.05e-65], t$95$2, If[LessEqual[y, 1.35e-186], 1.0, If[LessEqual[y, 8.1e+96], t$95$2, t$95$1]]]]]]]
\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
↓
\begin{array}{l}
t_0 := y \cdot \left(y \cdot 4\right)\\
t_1 := \mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
t_2 := \frac{x \cdot x - t_0}{x \cdot x + t_0}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-186}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 8.1 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}