Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[\mathsf{fma}\left(y \cdot 4, t, x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\right)
\]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t)))) ↓
(FPCore (x y z t)
:precision binary64
(fma (* y 4.0) t (+ (* 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) {
return fma((y * 4.0), t, ((x * x) + (z * (z * (y * -4.0)))));
}
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 fma(Float64(y * 4.0), t, Float64(Float64(x * x) + Float64(z * Float64(z * Float64(y * -4.0)))))
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[(y * 4.0), $MachinePrecision] * t + N[(N[(x * x), $MachinePrecision] + N[(z * N[(z * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\mathsf{fma}\left(y \cdot 4, t, x \cdot x + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\right)
Alternatives Alternative 1 Error 1.5 Cost 2632
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_2 := x \cdot x + \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{if}\;t_2 \leq -3 \cdot 10^{+239}:\\
\;\;\;\;y \cdot \left(4 \cdot t\right) + t_1\\
\mathbf{elif}\;t_2 \leq 10^{+301}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 7.8 Cost 1352
\[\begin{array}{l}
t_1 := y \cdot \left(4 \cdot t\right)\\
\mathbf{if}\;z \cdot z \leq 4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot x + t_1\\
\mathbf{elif}\;z \cdot z \leq 10^{+186}:\\
\;\;\;\;x \cdot x + \left(z \cdot z\right) \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 3 Error 7.7 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^{+150}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5.982292274178094 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5884695087961294 \cdot 10^{-36}:\\
\;\;\;\;x \cdot x + y \cdot \left(4 \cdot t\right)\\
\mathbf{elif}\;z \leq 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 27.4 Cost 1112
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot t\\
\mathbf{if}\;x \leq -1.144215616297275 \cdot 10^{+38}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -9.819463945390145 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.808366598262015 \cdot 10^{-124}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 2.9050936374770467 \cdot 10^{-136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.026011181677652 \cdot 10^{-123}:\\
\;\;\;\;-4 \cdot \left(y \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 3.806009017528787 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Error 27.9 Cost 1112
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_2 := \left(y \cdot 4\right) \cdot t\\
\mathbf{if}\;x \leq -1.144215616297275 \cdot 10^{+38}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -1.1074662465827733 \cdot 10^{-53}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.618564010328473 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.9050936374770467 \cdot 10^{-136}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.026011181677652 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.806009017528787 \cdot 10^{-56}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 6 Error 15.5 Cost 1104
\[\begin{array}{l}
t_1 := y \cdot \left(\left(z \cdot z - t\right) \cdot -4\right)\\
\mathbf{if}\;x \leq -1.144215616297275 \cdot 10^{+38}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3.806009017528787 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.224281303079908 \cdot 10^{-30}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 6006365075690575000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 7 Error 8.1 Cost 1096
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{-52}:\\
\;\;\;\;x \cdot x + y \cdot \left(4 \cdot t\right)\\
\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+279}:\\
\;\;\;\;y \cdot \left(\left(z \cdot z - t\right) \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 8 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 9 Error 27.2 Cost 848
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot t\\
\mathbf{if}\;x \leq -1.144215616297275 \cdot 10^{+38}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -9.819463945390145 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.808366598262015 \cdot 10^{-124}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3.806009017528787 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 10 Error 41.5 Cost 192
\[x \cdot x
\]