Average Error: 0.3 → 0.3
Time: 3.4s
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 r762410 = x;
        double r762411 = 3.0;
        double r762412 = r762410 * r762411;
        double r762413 = y;
        double r762414 = r762412 * r762413;
        double r762415 = r762414 * r762413;
        return r762415;
}

double f(double x, double y) {
        double r762416 = x;
        double r762417 = 3.0;
        double r762418 = r762416 * r762417;
        double r762419 = y;
        double r762420 = r762418 * r762419;
        double r762421 = r762420 * r762419;
        return r762421;
}

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 2020036 
(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))