Average Error: 0.0 → 0.0
Time: 5.4s
Precision: 64
\[x - y \cdot z\]
\[x - y \cdot z\]
x - y \cdot z
x - y \cdot z
double f(double x, double y, double z) {
        double r633658 = x;
        double r633659 = y;
        double r633660 = z;
        double r633661 = r633659 * r633660;
        double r633662 = r633658 - r633661;
        return r633662;
}

double f(double x, double y, double z) {
        double r633663 = x;
        double r633664 = y;
        double r633665 = z;
        double r633666 = r633664 * r633665;
        double r633667 = r633663 - r633666;
        return r633667;
}

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

Target

Original0.0
Target0.0
Herbie0.0
\[\frac{x + y \cdot z}{\frac{x + y \cdot z}{x - y \cdot z}}\]

Derivation

  1. Initial program 0.0

    \[x - y \cdot z\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019194 
(FPCore (x y z)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, C"

  :herbie-target
  (/ (+ x (* y z)) (/ (+ x (* y z)) (- x (* y z))))

  (- x (* y z)))