Average Error: 0.0 → 0.0
Time: 18.7s
Precision: binary64
Cost: 704
\[\left(x \cdot y + z \cdot t\right) + a \cdot b\]
\[a \cdot b + \left(x \cdot y + z \cdot t\right)\]
\left(x \cdot y + z \cdot t\right) + a \cdot b
a \cdot b + \left(x \cdot y + z \cdot t\right)
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
(FPCore (x y z t a b) :precision binary64 (+ (* a b) (+ (* x y) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * y) + (z * t)) + (a * b);
}
double code(double x, double y, double z, double t, double a, double b) {
	return (a * b) + ((x * y) + (z * t));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error8.9
Cost1032
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.4224964295545865 \cdot 10^{-25} \lor \neg \left(x \cdot y \leq 63299.90423924046\right):\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \end{array}\]
Alternative 2
Error9.8
Cost1553
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1.5142174969701798 \cdot 10^{-72} \lor \neg \left(z \cdot t \leq 1.9928489889562997 \cdot 10^{-104} \lor \neg \left(z \cdot t \leq 6.219343235920281 \cdot 10^{-75}\right) \land z \cdot t \leq 4.2618896535764406 \cdot 10^{-20}\right):\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \end{array}\]
Alternative 3
Error12.7
Cost1032
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.2702228399961762 \cdot 10^{+96} \lor \neg \left(a \cdot b \leq 1.0812796783942197 \cdot 10^{+123}\right):\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \end{array}\]
Alternative 4
Error30.1
Cost3784
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.989196908691086 \cdot 10^{-07}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -9.938511773621857 \cdot 10^{-160}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -6.6639698387565696 \cdot 10^{-186}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq -1.3018058333461053 \cdot 10^{-234}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -5.1373736359606 \cdot 10^{-318}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 2.295146222486271 \cdot 10^{-155}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 3.656426731504235 \cdot 10^{-82}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 1.1925811832237125 \cdot 10^{-05}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]
Alternative 5
Error30.3
Cost1297
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -5.3561253006343874 \cdot 10^{-73} \lor \neg \left(z \cdot t \leq 3.1542771986425063 \cdot 10^{-106} \lor \neg \left(z \cdot t \leq 9.692397487688842 \cdot 10^{-70}\right) \land z \cdot t \leq 2.4102991657790487 \cdot 10^{-20}\right):\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array}\]
Alternative 6
Error41.9
Cost192
\[a \cdot b\]
Alternative 7
Error61.9
Cost64
\[-1\]
Alternative 8
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

    \[\left(x \cdot y + z \cdot t\right) + a \cdot b\]
  2. Simplified0.0

    \[\leadsto \color{blue}{a \cdot b + \left(x \cdot y + z \cdot t\right)}\]
  3. Final simplification0.0

    \[\leadsto a \cdot b + \left(x \cdot y + z \cdot t\right)\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z t a b)
  :name "Linear.V3:$cdot from linear-1.19.1.3, B"
  :precision binary64
  (+ (+ (* x y) (* z t)) (* a b)))