Average Error: 0.3 → 0.3
Time: 24.9s
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 r485880 = x;
        double r485881 = 3.0;
        double r485882 = r485880 * r485881;
        double r485883 = y;
        double r485884 = r485882 * r485883;
        double r485885 = r485884 * r485883;
        return r485885;
}

double f(double x, double y) {
        double r485886 = x;
        double r485887 = 3.0;
        double r485888 = r485886 * r485887;
        double r485889 = y;
        double r485890 = r485888 * r485889;
        double r485891 = r485890 * r485889;
        return r485891;
}

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