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 := z \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+112}:\\
\;\;\;\;x \cdot x + z \cdot t_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t_1, x \cdot x\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 (* z (* y -4.0))))
(if (<= z -2.4e+112)
(+ (* x x) (* z t_1))
(if (<= z 2e+136)
(fma x x (* (* 4.0 y) (- t (* z z))))
(fma z t_1 (* x x)))))) 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 = z * (y * -4.0);
double tmp;
if (z <= -2.4e+112) {
tmp = (x * x) + (z * t_1);
} else if (z <= 2e+136) {
tmp = fma(x, x, ((4.0 * y) * (t - (z * z))));
} else {
tmp = fma(z, t_1, (x * x));
}
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)
t_1 = Float64(z * Float64(y * -4.0))
tmp = 0.0
if (z <= -2.4e+112)
tmp = Float64(Float64(x * x) + Float64(z * t_1));
elseif (z <= 2e+136)
tmp = fma(x, x, Float64(Float64(4.0 * y) * Float64(t - Float64(z * z))));
else
tmp = fma(z, t_1, Float64(x * x));
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_] := Block[{t$95$1 = N[(z * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+112], N[(N[(x * x), $MachinePrecision] + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+136], N[(x * x + N[(N[(4.0 * y), $MachinePrecision] * N[(t - N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * t$95$1 + N[(x * x), $MachinePrecision]), $MachinePrecision]]]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
t_1 := z \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+112}:\\
\;\;\;\;x \cdot x + z \cdot t_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t_1, x \cdot x\right)\\
\end{array}
Alternatives Alternative 1 Error 0.2 Cost 7240
\[\begin{array}{l}
t_1 := z \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+112}:\\
\;\;\;\;x \cdot x + z \cdot t_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+142}:\\
\;\;\;\;x \cdot x + \left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t_1, x \cdot x\right)\\
\end{array}
\]
Alternative 2 Error 8.3 Cost 1764
\[\begin{array}{l}
t_1 := x \cdot x + -4 \cdot \left(y \cdot \left(z \cdot z\right)\right)\\
t_2 := 4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
t_3 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_4 := x \cdot x + \left(4 \cdot y\right) \cdot t\\
\mathbf{if}\;z \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.28 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-105}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3700:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+69}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+142}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 3 Error 7.5 Cost 1496
\[\begin{array}{l}
t_1 := x \cdot x + \left(4 \cdot y\right) \cdot t\\
t_2 := x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_3 := 4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{if}\;z \leq -7.3 \cdot 10^{-25}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-34}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2900:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+54}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 26.9 Cost 1376
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_2 := \left(4 \cdot y\right) \cdot t\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-42}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-184}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.4 \cdot 10^{-260}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.35 \cdot 10^{-264}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-208}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-193}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Error 8.9 Cost 1368
\[\begin{array}{l}
t_1 := 4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_3 := x \cdot x + \left(4 \cdot y\right) \cdot t\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-105}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 31000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 0.2 Cost 1097
\[\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+112} \lor \neg \left(z \leq 5.2 \cdot 10^{+139}\right):\\
\;\;\;\;x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + \left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\\
\end{array}
\]
Alternative 7 Error 16.1 Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-43} \lor \neg \left(x \leq 7 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
\end{array}
\]
Alternative 8 Error 25.8 Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-42} \lor \neg \left(x \leq 7.8 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(4 \cdot y\right) \cdot t\\
\end{array}
\]
Alternative 9 Error 41.9 Cost 192
\[x \cdot x
\]