Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\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
(if (<= (* z z) 1e+192)
(fma x x (* (- (* z z) t) (* y -4.0)))
(fma x x (* -4.0 (* z (* z y)))))) 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 tmp;
if ((z * z) <= 1e+192) {
tmp = fma(x, x, (((z * z) - t) * (y * -4.0)));
} else {
tmp = fma(x, x, (-4.0 * (z * (z * y))));
}
return tmp;
}
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)
tmp = 0.0
if (Float64(z * z) <= 1e+192)
tmp = fma(x, x, Float64(Float64(Float64(z * z) - t) * Float64(y * -4.0)));
else
tmp = fma(x, x, Float64(-4.0 * Float64(z * Float64(z * y))));
end
return tmp
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_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+192], N[(x * x + N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * x + N[(-4.0 * N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 0.5 Cost 7236
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+192}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right) + x \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\right)\\
\end{array}
\]
Alternative 2 Error 7.0 Cost 1745
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;z \cdot z \leq 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 1000:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{+62} \lor \neg \left(z \cdot z \leq 5 \cdot 10^{+112}\right):\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right) + x \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 9.6 Cost 1616
\[\begin{array}{l}
t_1 := \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
t_2 := x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;z \cdot z \leq 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \cdot z \leq 50000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 1.5 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \cdot z \leq 10^{+192}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 4 Error 16.1 Cost 1357
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 4.7 \cdot 10^{-73} \lor \neg \left(x \cdot x \leq 105000000000\right) \land x \cdot x \leq 5.8 \cdot 10^{+72}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Error 26.6 Cost 1112
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_2 := t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-21}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-185}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-301}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-281}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 6 Error 0.5 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+192}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right) + x \cdot x\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right) + x \cdot x\\
\end{array}
\]
Alternative 7 Error 24.9 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-19}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-46}:\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 8 Error 41.5 Cost 192
\[x \cdot x
\]