Average Error: 0.0 → 0.0
Time: 2.1s
Precision: binary64
\[\left(x + y\right) \cdot z\]
\[x \cdot z + z \cdot y\]
\left(x + y\right) \cdot z
x \cdot z + z \cdot y
(FPCore (x y z) :precision binary64 (* (+ x y) z))
(FPCore (x y z) :precision binary64 (+ (* x z) (* z y)))
double code(double x, double y, double z) {
	return (x + y) * z;
}
double code(double x, double y, double z) {
	return (x * z) + (z * 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

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) \cdot z\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt_binary6430.2

    \[\leadsto \color{blue}{\sqrt{\left(x + y\right) \cdot z} \cdot \sqrt{\left(x + y\right) \cdot z}}\]
  4. Simplified30.2

    \[\leadsto \color{blue}{\sqrt{z \cdot \left(y + x\right)}} \cdot \sqrt{\left(x + y\right) \cdot z}\]
  5. Simplified30.2

    \[\leadsto \sqrt{z \cdot \left(y + x\right)} \cdot \color{blue}{\sqrt{z \cdot \left(y + x\right)}}\]
  6. Taylor expanded around 0 0.0

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

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

Reproduce

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