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

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
Error7.3
Cost648
\[\begin{array}{l} \mathbf{if}\;z \leq -2.393371478284359 \cdot 10^{-168} \lor \neg \left(z \leq 1.4419151874199413 \cdot 10^{-129}\right):\\ \;\;\;\;x + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot y\\ \end{array}\]
Alternative 2
Error12.2
Cost320
\[x + y \cdot z\]
Alternative 3
Error61.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

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

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

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

Reproduce

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