Average Error: 0.0 → 0.0
Time: 3.2min
Precision: binary64
Cost: 704
\[\left(x \cdot y + z \cdot t\right) + a \cdot b\]
\[a \cdot b + \left(z \cdot t + x \cdot y\right)\]
\left(x \cdot y + z \cdot t\right) + a \cdot b
a \cdot b + \left(z \cdot t + x \cdot y\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) (+ (* z t) (* x y))))
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) + ((z * t) + (x * y));
}

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
Error10.7
Cost1346
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -9.54375048507304 \cdot 10^{+58}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 4.084359990154298 \cdot 10^{-109}:\\ \;\;\;\;z \cdot t + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \end{array}\]
Alternative 2
Error8.7
Cost1032
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -0.001356667731052886 \lor \neg \left(z \cdot t \leq 1.0006694123294189 \cdot 10^{-50}\right):\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \end{array}\]
Alternative 3
Error12.0
Cost1032
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1.7908142242030247 \cdot 10^{+105} \lor \neg \left(z \cdot t \leq 2.552398641275551 \cdot 10^{+85}\right):\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \end{array}\]
Alternative 4
Error30.6
Cost3784
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -3.528999156993102 \cdot 10^{+75}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;z \cdot t \leq -1.3337194595517511 \cdot 10^{+43}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;z \cdot t \leq -2.6958266973327024 \cdot 10^{+35}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;z \cdot t \leq -1.3724239219887492 \cdot 10^{-191}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;z \cdot t \leq -3.4570490668743857 \cdot 10^{-253}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;z \cdot t \leq 6.097734361276465 \cdot 10^{-307}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;z \cdot t \leq 1.7144675293214767 \cdot 10^{-271}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;z \cdot t \leq 4.6011493565390685 \cdot 10^{-48}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot t\\ \end{array}\]
Alternative 5
Error30.6
Cost1297
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1.2984850650924513 \cdot 10^{+74} \lor \neg \left(z \cdot t \leq 1.647600517088823 \cdot 10^{-73} \lor \neg \left(z \cdot t \leq 9.641047410692381 \cdot 10^{+45}\right) \land z \cdot t \leq 1.4215047223515902 \cdot 10^{+84}\right):\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array}\]
Alternative 6
Error41.0
Cost192
\[a \cdot b\]
Alternative 7
Error61.8
Cost64
\[1\]

Error

Time

Derivation

  1. Initial program 0.0

    \[\left(x \cdot y + z \cdot t\right) + a \cdot b\]
  2. Using strategy rm
  3. Applied flip-+_binary64_243930.1

    \[\leadsto \color{blue}{\frac{\left(x \cdot y + z \cdot t\right) \cdot \left(x \cdot y + z \cdot t\right) - \left(a \cdot b\right) \cdot \left(a \cdot b\right)}{\left(x \cdot y + z \cdot t\right) - a \cdot b}}\]
  4. Taylor expanded around 0 55.4

    \[\leadsto \frac{\color{blue}{{t}^{2} \cdot {z}^{2} - {a}^{2} \cdot {b}^{2}}}{\left(x \cdot y + z \cdot t\right) - a \cdot b}\]
  5. Simplified40.7

    \[\leadsto \frac{\color{blue}{\left(z \cdot t\right) \cdot \left(z \cdot t\right) - {\left(a \cdot b\right)}^{2}}}{\left(x \cdot y + z \cdot t\right) - a \cdot b}\]
  6. Taylor expanded around inf 0.0

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

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

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

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

Reproduce

herbie shell --seed 2021040 
(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)))