Average Error: 0.0 → 0.0
Time: 4.0s
Precision: binary64
Cost: 320
\[\left(x + y\right) \cdot z\]
\[\left(x + y\right) \cdot z\]
\left(x + y\right) \cdot z
\left(x + y\right) \cdot z
(FPCore (x y z) :precision binary64 (* (+ x y) z))
(FPCore (x y z) :precision binary64 (* (+ x y) z))
double code(double x, double y, double z) {
	return (x + y) * z;
}
double code(double x, double y, double z) {
	return (x + y) * 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
Error15.7
Cost785
\[\begin{array}{l} \mathbf{if}\;y \leq -90361842115.60765 \lor \neg \left(y \leq 5.291094144828729 \cdot 10^{-180} \lor \neg \left(y \leq 2.076462546695796 \cdot 10^{-167}\right) \land y \leq 1.942478763694612 \cdot 10^{-63}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array}\]
Alternative 2
Error29.7
Cost192
\[y \cdot z\]
Alternative 3
Error59.0
Cost64
\[0\]
Alternative 4
Error61.7
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

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

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

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

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, B"
  :precision binary64
  (* (+ x y) z))