Average Error: 0.2 → 0.2
Time: 2.0s
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 r674879 = x;
        double r674880 = 3.0;
        double r674881 = r674879 * r674880;
        double r674882 = y;
        double r674883 = r674881 * r674882;
        double r674884 = z;
        double r674885 = r674883 - r674884;
        return r674885;
}

double f(double x, double y, double z) {
        double r674886 = x;
        double r674887 = 3.0;
        double r674888 = r674886 * r674887;
        double r674889 = y;
        double r674890 = r674888 * r674889;
        double r674891 = z;
        double r674892 = r674890 - r674891;
        return r674892;
}

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.2
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 2019322 
(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))