Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[\left(x + y\right) \cdot z\]
\[\frac{\left(x - y\right) \cdot z}{\frac{x - y}{x + y}}\]
\left(x + y\right) \cdot z
\frac{\left(x - y\right) \cdot z}{\frac{x - y}{x + y}}
double f(double x, double y, double z) {
        double r19385 = x;
        double r19386 = y;
        double r19387 = r19385 + r19386;
        double r19388 = z;
        double r19389 = r19387 * r19388;
        return r19389;
}

double f(double x, double y, double z) {
        double r19390 = x;
        double r19391 = y;
        double r19392 = r19390 - r19391;
        double r19393 = z;
        double r19394 = r19392 * r19393;
        double r19395 = r19390 + r19391;
        double r19396 = r19392 / r19395;
        double r19397 = r19394 / r19396;
        return r19397;
}

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 flip-+24.8

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

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

    \[\leadsto \frac{\color{blue}{\left(z \cdot \left(x - y\right)\right) \cdot \left(x + y\right)}}{x - y}\]
  6. Using strategy rm
  7. Applied associate-/l*0.0

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

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

    \[\leadsto \frac{\left(x - y\right) \cdot z}{\frac{x - y}{x + y}}\]

Reproduce

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