Average Error: 0.1 → 0.1
Time: 20.4s
Precision: 64
\[\left(x \cdot 3\right) \cdot y - z\]
\[3 \cdot \left(x \cdot y\right) - z\]
\left(x \cdot 3\right) \cdot y - z
3 \cdot \left(x \cdot y\right) - z
double f(double x, double y, double z) {
        double r430753 = x;
        double r430754 = 3.0;
        double r430755 = r430753 * r430754;
        double r430756 = y;
        double r430757 = r430755 * r430756;
        double r430758 = z;
        double r430759 = r430757 - r430758;
        return r430759;
}

double f(double x, double y, double z) {
        double r430760 = 3.0;
        double r430761 = x;
        double r430762 = y;
        double r430763 = r430761 * r430762;
        double r430764 = r430760 * r430763;
        double r430765 = z;
        double r430766 = r430764 - r430765;
        return r430766;
}

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. Taylor expanded around 0 0.1

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

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

Reproduce

herbie shell --seed 2020042 +o rules:numerics
(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))