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 2 \cdot 10^{+276}:\\
\;\;\;\;x \cdot x + y \cdot \left(\mathsf{fma}\left(z, z, -t\right) \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + z \cdot \frac{y \cdot 4}{\frac{-1}{z}}\\
\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) 2e+276)
(+ (* x x) (* y (* (fma z z (- t)) -4.0)))
(+ (* x x) (* z (/ (* y 4.0) (/ -1.0 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 tmp;
if ((z * z) <= 2e+276) {
tmp = (x * x) + (y * (fma(z, z, -t) * -4.0));
} else {
tmp = (x * x) + (z * ((y * 4.0) / (-1.0 / z)));
}
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) <= 2e+276)
tmp = Float64(Float64(x * x) + Float64(y * Float64(fma(z, z, Float64(-t)) * -4.0)));
else
tmp = Float64(Float64(x * x) + Float64(z * Float64(Float64(y * 4.0) / Float64(-1.0 / z))));
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], 2e+276], N[(N[(x * x), $MachinePrecision] + N[(y * N[(N[(z * z + (-t)), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] + N[(z * N[(N[(y * 4.0), $MachinePrecision] / N[(-1.0 / z), $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 2 \cdot 10^{+276}:\\
\;\;\;\;x \cdot x + y \cdot \left(\mathsf{fma}\left(z, z, -t\right) \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + z \cdot \frac{y \cdot 4}{\frac{-1}{z}}\\
\end{array}
Alternatives Alternative 1 Error 7.3 Cost 1744
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{-22}:\\
\;\;\;\;\left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{elif}\;z \cdot z \leq 2000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+304}:\\
\;\;\;\;x \cdot x - y \cdot \left(\left(z \cdot z\right) \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\end{array}
\]
Alternative 2 Error 6.5 Cost 1484
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{-22}:\\
\;\;\;\;\left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{elif}\;z \cdot z \leq 2000000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\\
\end{array}
\]
Alternative 3 Error 26.8 Cost 1372
\[\begin{array}{l}
t_1 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
t_2 := 4 \cdot \left(y \cdot t\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-15}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8.4 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \left(4 \cdot t\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-101}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 4 Error 26.7 Cost 1372
\[\begin{array}{l}
t_1 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
t_2 := 4 \cdot \left(y \cdot t\right)\\
\mathbf{if}\;x \leq -5.2 \cdot 10^{-13}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \left(4 \cdot t\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-157}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-100}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Error 8.7 Cost 1104
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
t_2 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 780000:\\
\;\;\;\;x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 0.3 Cost 1097
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+91} \lor \neg \left(z \leq 1.5 \cdot 10^{+139}\right):\\
\;\;\;\;x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + y \cdot \left(4 \cdot \left(t - z \cdot z\right)\right)\\
\end{array}
\]
Alternative 7 Error 0.2 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+276}:\\
\;\;\;\;x \cdot x + y \cdot \left(4 \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + z \cdot \frac{y \cdot 4}{\frac{-1}{z}}\\
\end{array}
\]
Alternative 8 Error 15.8 Cost 840
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+41}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 21000:\\
\;\;\;\;\left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 9 Error 25.9 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-21}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-65}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 10 Error 25.9 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-14}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \left(4 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 11 Error 41.0 Cost 192
\[x \cdot x
\]