Average Error: 0.1 → 0.1
Time: 17.2s
Precision: 64
\[\left(x \cdot 3.0\right) \cdot y - z\]
\[\left(x \cdot 3.0\right) \cdot y - z\]
\left(x \cdot 3.0\right) \cdot y - z
\left(x \cdot 3.0\right) \cdot y - z
double f(double x, double y, double z) {
        double r32536143 = x;
        double r32536144 = 3.0;
        double r32536145 = r32536143 * r32536144;
        double r32536146 = y;
        double r32536147 = r32536145 * r32536146;
        double r32536148 = z;
        double r32536149 = r32536147 - r32536148;
        return r32536149;
}

double f(double x, double y, double z) {
        double r32536150 = x;
        double r32536151 = 3.0;
        double r32536152 = r32536150 * r32536151;
        double r32536153 = y;
        double r32536154 = r32536152 * r32536153;
        double r32536155 = z;
        double r32536156 = r32536154 - r32536155;
        return r32536156;
}

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.0 \cdot y\right) - z\]

Derivation

  1. Initial program 0.1

    \[\left(x \cdot 3.0\right) \cdot y - z\]
  2. Final simplification0.1

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

Reproduce

herbie shell --seed 2019162 +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))