Average Error: 0.2 → 0.2
Time: 2.1s
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 r784885 = x;
        double r784886 = 3.0;
        double r784887 = r784885 * r784886;
        double r784888 = y;
        double r784889 = r784887 * r784888;
        double r784890 = z;
        double r784891 = r784889 - r784890;
        return r784891;
}

double f(double x, double y, double z) {
        double r784892 = x;
        double r784893 = 3.0;
        double r784894 = r784892 * r784893;
        double r784895 = y;
        double r784896 = r784894 * r784895;
        double r784897 = z;
        double r784898 = r784896 - r784897;
        return r784898;
}

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 2020001 
(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))