Average Error: 0.1 → 0.1
Time: 21.8s
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 r31675982 = x;
        double r31675983 = 3.0;
        double r31675984 = r31675982 * r31675983;
        double r31675985 = y;
        double r31675986 = r31675984 * r31675985;
        double r31675987 = z;
        double r31675988 = r31675986 - r31675987;
        return r31675988;
}

double f(double x, double y, double z) {
        double r31675989 = x;
        double r31675990 = 3.0;
        double r31675991 = r31675989 * r31675990;
        double r31675992 = y;
        double r31675993 = r31675991 * r31675992;
        double r31675994 = z;
        double r31675995 = r31675993 - r31675994;
        return r31675995;
}

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 2019169 +o rules:numerics
(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))