Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[x \cdot x - \mathsf{fma}\left(z \cdot \left(y \cdot 4\right), z, \left(y \cdot -4\right) \cdot t\right)
\]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t)))) ↓
(FPCore (x y z t)
:precision binary64
(- (* x x) (fma (* z (* y 4.0)) z (* (* y -4.0) 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) {
return (x * x) - fma((z * (y * 4.0)), z, ((y * -4.0) * t));
}
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)
return Float64(Float64(x * x) - fma(Float64(z * Float64(y * 4.0)), z, Float64(Float64(y * -4.0) * t)))
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_] := N[(N[(x * x), $MachinePrecision] - N[(N[(z * N[(y * 4.0), $MachinePrecision]), $MachinePrecision] * z + N[(N[(y * -4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
x \cdot x - \mathsf{fma}\left(z \cdot \left(y \cdot 4\right), z, \left(y \cdot -4\right) \cdot t\right)
Alternatives Alternative 1 Error 0.1 Cost 7360
\[\mathsf{fma}\left(y \cdot 4, t, x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\right)
\]
Alternative 2 Error 26.4 Cost 2008
\[\begin{array}{l}
t_1 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
t_2 := \left(y \cdot 4\right) \cdot t\\
\mathbf{if}\;x \cdot x \leq 4.3 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 7 \cdot 10^{-171}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 2.3 \cdot 10^{-130}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 6 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 6.2 \cdot 10^{-60}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \cdot x \leq 7 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 3 Error 15.5 Cost 1356
\[\begin{array}{l}
t_1 := y \cdot \left(4 \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{if}\;x \cdot x \leq 1.95 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 1.7 \cdot 10^{+24}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \cdot x \leq 6.2 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 4 Error 8.1 Cost 1232
\[\begin{array}{l}
t_1 := 4 \cdot \left(y \cdot t - y \cdot \left(z \cdot z\right)\right)\\
t_2 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+151}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.026:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot t\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 8.1 Cost 1104
\[\begin{array}{l}
t_1 := y \cdot \left(4 \cdot \left(t - z \cdot z\right)\right)\\
t_2 := -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+151}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.039:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot t\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 0.1 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+285}:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + z \cdot \left(\left(z \cdot y\right) \cdot -4\right)\\
\end{array}
\]
Alternative 7 Error 0.1 Cost 1088
\[x \cdot x + \left(y \cdot \left(4 \cdot t\right) - z \cdot \left(z \cdot \left(y \cdot 4\right)\right)\right)
\]
Alternative 8 Error 6.6 Cost 968
\[\begin{array}{l}
t_1 := x \cdot x + z \cdot \left(\left(z \cdot y\right) \cdot -4\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1350000000:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 26.1 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+22}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-61}:\\
\;\;\;\;\left(y \cdot 4\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 10 Error 41.5 Cost 192
\[x \cdot x
\]