Average Error: 0.3 → 0.3
Time: 8.3s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[y \cdot \left(\left(x \cdot 3\right) \cdot y\right)\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
y \cdot \left(\left(x \cdot 3\right) \cdot y\right)
double f(double x, double y) {
        double r1477160 = x;
        double r1477161 = 3.0;
        double r1477162 = r1477160 * r1477161;
        double r1477163 = y;
        double r1477164 = r1477162 * r1477163;
        double r1477165 = r1477164 * r1477163;
        return r1477165;
}

double f(double x, double y) {
        double r1477166 = y;
        double r1477167 = x;
        double r1477168 = 3.0;
        double r1477169 = r1477167 * r1477168;
        double r1477170 = r1477169 * r1477166;
        double r1477171 = r1477166 * r1477170;
        return r1477171;
}

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 y \cdot \left(\left(x \cdot 3\right) \cdot y\right)\]

Reproduce

herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"

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

  (* (* (* x 3.0) y) y))