Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, x, \begin{array}{l}
\mathbf{if}\;y \cdot z \ne 0:\\
\;\;\;\;\frac{z \cdot -4}{\frac{1}{y \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot y\right) \cdot \left(z \cdot z\right)\\
\end{array}\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;x \cdot x - t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(\left(-4 \cdot y\right) \cdot z\right) \cdot z\right)\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t)))) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (* y 4.0) (- (* z z) t))))
(if (<= t_1 (- INFINITY))
(fma
x
x
(if (!= (* y z) 0.0)
(/ (* z -4.0) (/ 1.0 (* y z)))
(* (* -4.0 y) (* z z))))
(if (<= t_1 2e+293) (- (* x x) t_1) (fma x x (* (* (* -4.0 y) z) z)))))) double code(double x, double y, double z, double t) {
return (x * x) - ((y * 4.0) * ((z * z) - t));
}
↓
double code(double x, double y, double z, double t) {
double t_1 = (y * 4.0) * ((z * z) - t);
double tmp_1;
if (t_1 <= -((double) INFINITY)) {
double tmp_2;
if ((y * z) != 0.0) {
tmp_2 = (z * -4.0) / (1.0 / (y * z));
} else {
tmp_2 = (-4.0 * y) * (z * z);
}
tmp_1 = fma(x, x, tmp_2);
} else if (t_1 <= 2e+293) {
tmp_1 = (x * x) - t_1;
} else {
tmp_1 = fma(x, x, (((-4.0 * y) * z) * z));
}
return tmp_1;
}
function code(x, y, z, t)
return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
↓
function code(x, y, z, t)
t_1 = Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t))
tmp_1 = 0.0
if (t_1 <= Float64(-Inf))
tmp_2 = 0.0
if (Float64(y * z) != 0.0)
tmp_2 = Float64(Float64(z * -4.0) / Float64(1.0 / Float64(y * z)));
else
tmp_2 = Float64(Float64(-4.0 * y) * Float64(z * z));
end
tmp_1 = fma(x, x, tmp_2);
elseif (t_1 <= 2e+293)
tmp_1 = Float64(Float64(x * x) - t_1);
else
tmp_1 = fma(x, x, Float64(Float64(Float64(-4.0 * y) * z) * z));
end
return tmp_1
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x * x + If[Unequal[N[(y * z), $MachinePrecision], 0.0], N[(N[(z * -4.0), $MachinePrecision] / N[(1.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * y), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision], If[LessEqual[t$95$1, 2e+293], N[(N[(x * x), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * x + N[(N[(N[(-4.0 * y), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, x, \begin{array}{l}
\mathbf{if}\;y \cdot z \ne 0:\\
\;\;\;\;\frac{z \cdot -4}{\frac{1}{y \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;\left(-4 \cdot y\right) \cdot \left(z \cdot z\right)\\
\end{array}\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;x \cdot x - t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(\left(-4 \cdot y\right) \cdot z\right) \cdot z\right)\\
\end{array}
Alternatives Alternative 1 Error 0.2 Cost 7236
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+269}:\\
\;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(\left(-4 \cdot y\right) \cdot z\right) \cdot z\right)\\
\end{array}
\]
Alternative 2 Error 13.1 Cost 1104
\[\begin{array}{l}
t_1 := x \cdot x - \left(-4 \cdot y\right) \cdot t\\
t_2 := \left(\left(-4 \cdot y\right) \cdot z\right) \cdot z\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+140}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 250000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+65}:\\
\;\;\;\;\left(-4 \cdot y\right) \cdot \left(z \cdot z\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Error 0.2 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+269}:\\
\;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-4 \cdot y\right) \cdot z\right) \cdot z + x \cdot x\\
\end{array}
\]
Alternative 4 Error 6.5 Cost 968
\[\begin{array}{l}
t_1 := \left(\left(-4 \cdot y\right) \cdot z\right) \cdot z + x \cdot x\\
\mathbf{if}\;z \leq -22000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 12500000:\\
\;\;\;\;x \cdot x - \left(-4 \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 26.1 Cost 848
\[\begin{array}{l}
t_1 := \left(t \cdot 4\right) \cdot y\\
\mathbf{if}\;x \leq -4.55 \cdot 10^{-10}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 6.1 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+34}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 6 Error 41.9 Cost 192
\[x \cdot x
\]