?

Average Error: 0.0 → 0.0
Time: 36.9s
Precision: binary64
Cost: 6784

?

\[x \cdot y - z \cdot t \]
\[\mathsf{fma}\left(y, x, \left(-t\right) \cdot z\right) \]
(FPCore (x y z t) :precision binary64 (- (* x y) (* z t)))
(FPCore (x y z t) :precision binary64 (fma y x (* (- t) z)))
double code(double x, double y, double z, double t) {
	return (x * y) - (z * t);
}
double code(double x, double y, double z, double t) {
	return fma(y, x, (-t * z));
}
function code(x, y, z, t)
	return Float64(Float64(x * y) - Float64(z * t))
end
function code(x, y, z, t)
	return fma(y, x, Float64(Float64(-t) * z))
end
code[x_, y_, z_, t_] := N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := N[(y * x + N[((-t) * z), $MachinePrecision]), $MachinePrecision]
x \cdot y - z \cdot t
\mathsf{fma}\left(y, x, \left(-t\right) \cdot z\right)

Error?

Derivation?

  1. Initial program 0.0

    \[x \cdot y - z \cdot t \]
  2. Applied egg-rr0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \left(-t\right) \cdot z\right)} \]

Alternatives

Alternative 1
Error21.8
Cost1048
\[\begin{array}{l} t_1 := -t \cdot z\\ \mathbf{if}\;t \leq -1.12 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-149}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-37}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+58}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error0.0
Cost448
\[x \cdot y - z \cdot t \]
Alternative 3
Error30.7
Cost192
\[y \cdot x \]

Error

Reproduce?

herbie shell --seed 2023033 
(FPCore (x y z t)
  :name "Linear.V3:cross from linear-1.19.1.3"
  :precision binary64
  (- (* x y) (* z t)))