Average Error: 0.2 → 0.2
Time: 9.3s
Precision: 64
\[\left(x \cdot 3\right) \cdot y - z\]
\[\left(x \cdot 3\right) \cdot y - z\]
\left(x \cdot 3\right) \cdot y - z
\left(x \cdot 3\right) \cdot y - z
double f(double x, double y, double z) {
        double r490775 = x;
        double r490776 = 3.0;
        double r490777 = r490775 * r490776;
        double r490778 = y;
        double r490779 = r490777 * r490778;
        double r490780 = z;
        double r490781 = r490779 - r490780;
        return r490781;
}

double f(double x, double y, double z) {
        double r490782 = x;
        double r490783 = 3.0;
        double r490784 = r490782 * r490783;
        double r490785 = y;
        double r490786 = r490784 * r490785;
        double r490787 = z;
        double r490788 = r490786 - r490787;
        return r490788;
}

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.2
Target0.1
Herbie0.2
\[x \cdot \left(3 \cdot y\right) - z\]

Derivation

  1. Initial program 0.2

    \[\left(x \cdot 3\right) \cdot y - z\]
  2. Final simplification0.2

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

Reproduce

herbie shell --seed 2019235 
(FPCore (x y z)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (- (* x (* 3 y)) z)

  (- (* (* x 3) y) z))