Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+208}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(-4 \cdot y\right)\right)\\
\end{array}
\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 -1.3e+208)
(* -4.0 (* z (* z y)))
(fma x x (* (- (* z z) t) (* -4.0 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 <= -1.3e+208) {
tmp = -4.0 * (z * (z * y));
} else {
tmp = fma(x, x, (((z * z) - t) * (-4.0 * 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 (z <= -1.3e+208)
tmp = Float64(-4.0 * Float64(z * Float64(z * y)));
else
tmp = fma(x, x, Float64(Float64(Float64(z * z) - t) * Float64(-4.0 * 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[z, -1.3e+208], N[(-4.0 * N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * x + N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(-4.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+208}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(-4 \cdot y\right)\right)\\
\end{array}
\end{array}
Alternatives Alternative 1 Accuracy 93.3% Cost 7236
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+208}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(-4 \cdot y\right)\right)\\
\end{array}
\]
Alternative 2 Accuracy 60.3% Cost 1488
\[\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 \cdot x \leq 4.8 \cdot 10^{-281}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 1.02 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 1.9 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 2.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 3 Accuracy 58.4% Cost 1100
\[\begin{array}{l}
t_1 := 4 \cdot \left(y \cdot t\right)\\
\mathbf{if}\;x \cdot x \leq 6.4 \cdot 10^{-276}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 1.4 \cdot 10^{-111}:\\
\;\;\;\;-4 \cdot \left(y \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \cdot x \leq 1.5 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 4 Accuracy 95.0% Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 4 \cdot 10^{+300}:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\end{array}
\]
Alternative 5 Accuracy 79.5% Cost 840
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+23}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+88}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(-4 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 6 Accuracy 84.9% Cost 836
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+186}:\\
\;\;\;\;x \cdot x - t \cdot \left(-4 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\end{array}
\]
Alternative 7 Accuracy 59.2% Cost 580
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 1.55 \cdot 10^{+45}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 8 Accuracy 41.8% Cost 192
\[x \cdot x
\]