Average Error: 0.0 → 0.0
Time: 44.0s
Precision: binary64
Cost: 448
\[x \cdot y + z \cdot t\]
\[x \cdot y + z \cdot t\]
x \cdot y + z \cdot t
x \cdot y + z \cdot t
(FPCore (x y z t) :precision binary64 (+ (* x y) (* z t)))
(FPCore (x y z t) :precision binary64 (+ (* x y) (* z t)))
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 (x * y) + (z * t);
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error16.5
Cost1297
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.6469980270730156 \cdot 10^{+53} \lor \neg \left(x \cdot y \leq -1.6904139531878763 \cdot 10^{-94} \lor \neg \left(x \cdot y \leq -3.941334016551552 \cdot 10^{-128}\right) \land x \cdot y \leq 17820543016.50825\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot t\\ \end{array}\]
Alternative 2
Error30.9
Cost192
\[x \cdot y\]
Alternative 3
Error61.1
Cost64
\[0\]
Alternative 4
Error61.7
Cost64
\[1\]

Error

Time

Derivation

  1. Initial program 0.0

    \[x \cdot y + z \cdot t\]
  2. Using strategy rm
  3. Applied pow1_binary64_86640.0

    \[\leadsto \color{blue}{{\left(x \cdot y + z \cdot t\right)}^{1}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity_binary64_86030.0

    \[\leadsto {\color{blue}{\left(1 \cdot \left(x \cdot y + z \cdot t\right)\right)}}^{1}\]
  6. Using strategy rm
  7. Applied pow1_binary64_86640.0

    \[\leadsto {\left(1 \cdot \color{blue}{{\left(x \cdot y + z \cdot t\right)}^{1}}\right)}^{1}\]
  8. Using strategy rm
  9. Applied +-commutative_binary64_85330.0

    \[\leadsto {\left(1 \cdot {\color{blue}{\left(z \cdot t + x \cdot y\right)}}^{1}\right)}^{1}\]
  10. Simplified0.0

    \[\leadsto \color{blue}{x \cdot y + z \cdot t}\]
  11. Final simplification0.0

    \[\leadsto x \cdot y + z \cdot t\]

Reproduce

herbie shell --seed 2021040 
(FPCore (x y z t)
  :name "Linear.V2:$cdot from linear-1.19.1.3, A"
  :precision binary64
  (+ (* x y) (* z t)))