Average Error: 0.3 → 0.3
Time: 4.5s
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 r4558 = x;
        double r4559 = 3.0;
        double r4560 = r4558 * r4559;
        double r4561 = y;
        double r4562 = r4560 * r4561;
        double r4563 = r4562 * r4561;
        return r4563;
}

double f(double x, double y) {
        double r4564 = x;
        double r4565 = 3.0;
        double r4566 = r4564 * r4565;
        double r4567 = y;
        double r4568 = r4566 * r4567;
        double r4569 = r4568 * r4567;
        return r4569;
}

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.3
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 2020025 +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))