Average Error: 0.3 → 0.3
Time: 2.8s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
double f(double x, double y) {
        double r815869 = x;
        double r815870 = 3.0;
        double r815871 = r815869 * r815870;
        double r815872 = y;
        double r815873 = r815871 * r815872;
        double r815874 = r815873 * r815872;
        return r815874;
}

double f(double x, double y) {
        double r815875 = x;
        double r815876 = 3.0;
        double r815877 = r815875 * r815876;
        double r815878 = y;
        double r815879 = r815877 * r815878;
        double r815880 = r815879 * r815878;
        return r815880;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.2
Herbie0.3
\[\left(x \cdot \left(3 \cdot y\right)\right) \cdot y\]

Derivation

  1. Initial program 0.3

    \[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
  2. Final simplification0.3

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

Reproduce

herbie shell --seed 2019353 
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"
  :precision binary64

  :herbie-target
  (* (* x (* 3 y)) y)

  (* (* (* x 3) y) y))