Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[\left(x + y\right) \cdot z\]
\[z \cdot x + y \cdot z\]
\left(x + y\right) \cdot z
z \cdot x + y \cdot z
double f(double x, double y, double z) {
        double r17310 = x;
        double r17311 = y;
        double r17312 = r17310 + r17311;
        double r17313 = z;
        double r17314 = r17312 * r17313;
        return r17314;
}

double f(double x, double y, double z) {
        double r17315 = z;
        double r17316 = x;
        double r17317 = r17315 * r17316;
        double r17318 = y;
        double r17319 = r17318 * r17315;
        double r17320 = r17317 + r17319;
        return r17320;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\left(y + x\right) \cdot z}\]
  3. Using strategy rm
  4. Applied flip-+25.3

    \[\leadsto \color{blue}{\frac{y \cdot y - x \cdot x}{y - x}} \cdot z\]
  5. Applied associate-*l/30.3

    \[\leadsto \color{blue}{\frac{\left(y \cdot y - x \cdot x\right) \cdot z}{y - x}}\]
  6. Simplified20.1

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

    \[\leadsto \color{blue}{z \cdot y + x \cdot z}\]
  8. Simplified0.0

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

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

Reproduce

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