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^{+256}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot \left(y \cdot -4\right), z, 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
(if (<= (* z z) 2e+256)
(fma x x (* (- (* z z) t) (* y -4.0)))
(fma (* z (* y -4.0)) z (* 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 tmp;
if ((z * z) <= 2e+256) {
tmp = fma(x, x, (((z * z) - t) * (y * -4.0)));
} else {
tmp = fma((z * (y * -4.0)), z, (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)
tmp = 0.0
if (Float64(z * z) <= 2e+256)
tmp = fma(x, x, Float64(Float64(Float64(z * z) - t) * Float64(y * -4.0)));
else
tmp = fma(Float64(z * Float64(y * -4.0)), z, 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_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+256], N[(x * x + N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(y * -4.0), $MachinePrecision]), $MachinePrecision] * z + N[(x * x), $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^{+256}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot \left(y \cdot -4\right), z, x \cdot x\right)\\
\end{array}
Alternatives Alternative 1 Error 0.2 Cost 7236
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+256}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right) + x \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot \left(y \cdot -4\right), z, x \cdot x\right)\\
\end{array}
\]
Alternative 2 Error 27.9 Cost 1748
\[\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot y\right)\\
\mathbf{if}\;z \cdot z \leq 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 10^{-233}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{-137}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 3 Error 19.3 Cost 1740
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 10^{-129}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 4 Error 7.8 Cost 1232
\[\begin{array}{l}
t_1 := x \cdot x + \left(z \cdot z\right) \cdot \left(y \cdot -4\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.0648518555048894 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.422403819666622 \cdot 10^{-55}:\\
\;\;\;\;x \cdot x + y \cdot \left(t \cdot 4\right)\\
\mathbf{elif}\;z \leq 10^{+115}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 26.3 Cost 1100
\[\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot y\right)\\
\mathbf{if}\;x \cdot x \leq 5.903348252639539 \cdot 10^{-261}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 3.6616406915803755 \cdot 10^{-193}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;x \cdot x \leq 1.9426676544576173 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 6 Error 8.0 Cost 1096
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{-82}:\\
\;\;\;\;x \cdot x + y \cdot \left(t \cdot 4\right)\\
\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+256}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 7 Error 1.3 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+256}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right) + x \cdot x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 8 Error 26.2 Cost 848
\[\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot y\right)\\
\mathbf{if}\;x \leq -1.7599262833541525 \cdot 10^{-63}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 2.1585915846538582 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.988158621646355 \cdot 10^{-76}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 1.570961412167542 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 9 Error 41.1 Cost 192
\[x \cdot x
\]