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 5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\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) 5e+307)
(fma x x (* (- (* z z) t) (* y -4.0)))
(- (* x x) (* z (* z (* y 4.0)))))) 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) <= 5e+307) {
tmp = fma(x, x, (((z * z) - t) * (y * -4.0)));
} else {
tmp = (x * x) - (z * (z * (y * 4.0)));
}
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) <= 5e+307)
tmp = fma(x, x, Float64(Float64(Float64(z * z) - t) * Float64(y * -4.0)));
else
tmp = Float64(Float64(x * x) - Float64(z * Float64(z * Float64(y * 4.0))));
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], 5e+307], N[(x * x + N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] - N[(z * N[(z * N[(y * 4.0), $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 5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\\
\end{array}
Alternatives Alternative 1 Accuracy 96.4% Cost 7364
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\\
\end{array}
\]
Alternative 2 Accuracy 58.5% Cost 1748
\[\begin{array}{l}
t_1 := -4 \cdot \left(\left(z \cdot z\right) \cdot y\right)\\
t_2 := t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;x \cdot x \leq 2.05 \cdot 10^{-255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 8.6 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 1.35 \cdot 10^{-65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 1.05 \cdot 10^{-30}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \cdot x \leq 7.2 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 3 Accuracy 56.8% Cost 1622
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5.6 \cdot 10^{-214} \lor \neg \left(x \cdot x \leq 6.1 \cdot 10^{-164}\right) \land \left(x \cdot x \leq 1.2 \cdot 10^{-65} \lor \neg \left(x \cdot x \leq 1.75 \cdot 10^{+56}\right) \land x \cdot x \leq 3.2 \cdot 10^{+107}\right):\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 4 Accuracy 79.7% Cost 1357
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 2.5 \cdot 10^{-56} \lor \neg \left(x \cdot x \leq 6.4 \cdot 10^{-31}\right) \land x \cdot x \leq 2.7 \cdot 10^{+141}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Accuracy 84.7% Cost 1356
\[\begin{array}{l}
t_1 := x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;z \cdot z \leq 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 10^{+221}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 6 Accuracy 60.6% Cost 1240
\[\begin{array}{l}
t_1 := t \cdot \left(y \cdot 4\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-44}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-212}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+77}:\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Accuracy 95.7% Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+251}:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\\
\end{array}
\]
Alternative 8 Accuracy 89.9% Cost 964
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+52}:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\\
\end{array}
\]
Alternative 9 Accuracy 40.8% Cost 192
\[x \cdot x
\]