Average Error: 0.1 → 0.1
Time: 1.2s
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 r865838 = x;
        double r865839 = 3.0;
        double r865840 = r865838 * r865839;
        double r865841 = y;
        double r865842 = r865840 * r865841;
        double r865843 = z;
        double r865844 = r865842 - r865843;
        return r865844;
}

double f(double x, double y, double z) {
        double r865845 = x;
        double r865846 = 3.0;
        double r865847 = r865845 * r865846;
        double r865848 = y;
        double r865849 = r865847 * r865848;
        double r865850 = z;
        double r865851 = r865849 - r865850;
        return r865851;
}

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. Final simplification0.1

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

Reproduce

herbie shell --seed 2020083 
(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))