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 \leq -1.35 \cdot 10^{+154} \lor \neg \left(z \leq 7.4 \cdot 10^{+112}\right):\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot -4\right) \cdot \left(z \cdot z - t\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 (or (<= z -1.35e+154) (not (<= z 7.4e+112)))
(* z (* z (* y -4.0)))
(fma x x (* (* y -4.0) (- (* z z) t))))) 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 <= -1.35e+154) || !(z <= 7.4e+112)) {
tmp = z * (z * (y * -4.0));
} else {
tmp = fma(x, x, ((y * -4.0) * ((z * z) - t)));
}
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 ((z <= -1.35e+154) || !(z <= 7.4e+112))
tmp = Float64(z * Float64(z * Float64(y * -4.0)));
else
tmp = fma(x, x, Float64(Float64(y * -4.0) * Float64(Float64(z * z) - t)));
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[Or[LessEqual[z, -1.35e+154], N[Not[LessEqual[z, 7.4e+112]], $MachinePrecision]], N[(z * N[(z * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * x + N[(N[(y * -4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+154} \lor \neg \left(z \leq 7.4 \cdot 10^{+112}\right):\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 43.93% Cost 1504
\[\begin{array}{l}
t_1 := 4 \cdot \left(y \cdot t\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-159}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-271}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-7}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 2 Error 24.77% Cost 1357
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-71} \lor \neg \left(x \cdot x \leq 1.65 \cdot 10^{+15}\right) \land x \cdot x \leq 1.05 \cdot 10^{+76}:\\
\;\;\;\;\left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 3 Error 12.04% Cost 1104
\[\begin{array}{l}
t_1 := \left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+153}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-13}:\\
\;\;\;\;x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+112}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 12.2% Cost 1104
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+48}:\\
\;\;\;\;x \cdot x + -4 \cdot \left(y \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-12}:\\
\;\;\;\;x \cdot x + t \cdot \left(y \cdot 4\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+110}:\\
\;\;\;\;\left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 1.76% Cost 1097
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+154} \lor \neg \left(z \leq 7.4 \cdot 10^{+112}\right):\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot -4\right) \cdot \left(z \cdot z - t\right) + x \cdot x\\
\end{array}
\]
Alternative 6 Error 40.93% Cost 850
\[\begin{array}{l}
\mathbf{if}\;x \leq -114000000000 \lor \neg \left(x \leq 6 \cdot 10^{-61}\right) \land \left(x \leq 2300000000 \lor \neg \left(x \leq 1.48 \cdot 10^{+54}\right)\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 7 Error 40.94% Cost 849
\[\begin{array}{l}
\mathbf{if}\;x \leq -260000000000:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-60}:\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\
\mathbf{elif}\;x \leq 1650000000 \lor \neg \left(x \leq 1.6 \cdot 10^{+54}\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 8 Error 64.42% Cost 192
\[x \cdot x
\]