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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error32.4
Cost46272
\[x + \sqrt{x + z} \cdot \left(\sqrt[3]{y \cdot \sqrt{x + z}} \cdot \left(\sqrt[3]{y \cdot \sqrt{x + z}} \cdot \sqrt[3]{y \cdot \sqrt{x + z}}\right)\right)\]
Alternative 2
Error44.6
Cost20416
\[x + \sqrt{x + z} \cdot \left(y \cdot \sqrt{z} + 0.5 \cdot \left(\left(x \cdot y\right) \cdot \sqrt{\frac{1}{z}}\right)\right)\]
Alternative 3
Error44.8
Cost20288
\[x + \sqrt{x + z} \cdot \left(y \cdot \left(\sqrt{z} + 0.5 \cdot \left(x \cdot \sqrt{\frac{1}{z}}\right)\right)\right)\]
Alternative 4
Error31.1
Cost13632
\[x + \sqrt{y \cdot \left(x + z\right)} \cdot \sqrt{y \cdot \left(x + z\right)}\]
Alternative 5
Error32.2
Cost13504
\[x + \sqrt{x + z} \cdot \left(y \cdot \sqrt{x + z}\right)\]
Alternative 6
Error45.6
Cost13376
\[x + \sqrt{x + z} \cdot \left(y \cdot \sqrt{x}\right)\]
Alternative 7
Error26.6
Cost13312
\[x + \sqrt[3]{{\left(y \cdot \left(x + z\right)\right)}^{3}}\]
Alternative 8
Error26.6
Cost7616
\[x + \sqrt[3]{\left(y \cdot \left(x + z\right)\right) \cdot \left(\left(y \cdot \left(x + z\right)\right) \cdot \left(y \cdot \left(x + z\right)\right)\right)}\]
Alternative 9
Error0.0
Cost448
\[x + y \cdot \left(x + z\right)\]
Alternative 10
Error29.0
Cost320
\[y \cdot \left(x + z\right)\]
Alternative 11
Error11.5
Cost320
\[x + y \cdot z\]
Alternative 12
Error23.2
Cost320
\[x + x \cdot y\]
Alternative 13
Error40.0
Cost192
\[y \cdot z\]
Alternative 14
Error34.1
Cost64
\[x\]
Alternative 15
Error61.8
Cost64
\[1\]
Alternative 16
Error62.2
Cost64
\[0\]
Alternative 17
Error61.8
Cost64
\[-1\]

Error

Derivation

  1. Initial program 0.0

    \[x + y \cdot \left(z + x\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in_binary64_36840.0

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

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

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

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

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

Reproduce

herbie shell --seed 2021042 
(FPCore (x y z)
  :name "Main:bigenough2 from A"
  :precision binary64
  (+ x (* y (+ z x))))