\[\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(\frac{y}{x} \cdot \frac{y}{x}, -8, 1\right)\\
t_2 := \mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
t_3 := \frac{x \cdot x - t_0}{x \cdot x + t_0}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-109}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-146}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-76}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;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 (* (/ y x) (/ y x)) -8.0 1.0))
(t_2 (fma 0.5 (* (/ x y) (/ x y)) -1.0))
(t_3 (/ (- (* x x) t_0) (+ (* x x) t_0))))
(if (<= x -9.5e+100)
t_1
(if (<= x -2.5e-109)
t_3
(if (<= x 5.2e-146)
t_2
(if (<= x 8.5e-76) t_3 (if (<= x 4.6e+58) 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(((y / x) * (y / x)), -8.0, 1.0);
double t_2 = fma(0.5, ((x / y) * (x / y)), -1.0);
double t_3 = ((x * x) - t_0) / ((x * x) + t_0);
double tmp;
if (x <= -9.5e+100) {
tmp = t_1;
} else if (x <= -2.5e-109) {
tmp = t_3;
} else if (x <= 5.2e-146) {
tmp = t_2;
} else if (x <= 8.5e-76) {
tmp = t_3;
} else if (x <= 4.6e+58) {
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(Float64(Float64(y / x) * Float64(y / x)), -8.0, 1.0)
t_2 = fma(0.5, Float64(Float64(x / y) * Float64(x / y)), -1.0)
t_3 = Float64(Float64(Float64(x * x) - t_0) / Float64(Float64(x * x) + t_0))
tmp = 0.0
if (x <= -9.5e+100)
tmp = t_1;
elseif (x <= -2.5e-109)
tmp = t_3;
elseif (x <= 5.2e-146)
tmp = t_2;
elseif (x <= 8.5e-76)
tmp = t_3;
elseif (x <= 4.6e+58)
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[(N[(N[(y / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] * -8.0 + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(N[(x / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * x), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e+100], t$95$1, If[LessEqual[x, -2.5e-109], t$95$3, If[LessEqual[x, 5.2e-146], t$95$2, If[LessEqual[x, 8.5e-76], t$95$3, If[LessEqual[x, 4.6e+58], 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(\frac{y}{x} \cdot \frac{y}{x}, -8, 1\right)\\
t_2 := \mathsf{fma}\left(0.5, \frac{x}{y} \cdot \frac{x}{y}, -1\right)\\
t_3 := \frac{x \cdot x - t_0}{x \cdot x + t_0}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-109}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-146}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-76}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}