Average Error: 0.1 → 0.1
Time: 13.5s
Precision: 64
\[\left(x \cdot 3\right) \cdot y - z\]
\[\left(y \cdot 3\right) \cdot x - z\]
\left(x \cdot 3\right) \cdot y - z
\left(y \cdot 3\right) \cdot x - z
double f(double x, double y, double z) {
        double r22105028 = x;
        double r22105029 = 3.0;
        double r22105030 = r22105028 * r22105029;
        double r22105031 = y;
        double r22105032 = r22105030 * r22105031;
        double r22105033 = z;
        double r22105034 = r22105032 - r22105033;
        return r22105034;
}

double f(double x, double y, double z) {
        double r22105035 = y;
        double r22105036 = 3.0;
        double r22105037 = r22105035 * r22105036;
        double r22105038 = x;
        double r22105039 = r22105037 * r22105038;
        double r22105040 = z;
        double r22105041 = r22105039 - r22105040;
        return r22105041;
}

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

Derivation

  1. Initial program 0.1

    \[\left(x \cdot 3\right) \cdot y - z\]
  2. Using strategy rm
  3. Applied associate-*l*0.1

    \[\leadsto \color{blue}{x \cdot \left(3 \cdot y\right)} - z\]
  4. Final simplification0.1

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

Reproduce

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

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

  (- (* (* x 3.0) y) z))