Average Error: 0.3 → 0.3
Time: 3.2s
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 r738225 = x;
        double r738226 = 3.0;
        double r738227 = r738225 * r738226;
        double r738228 = y;
        double r738229 = r738227 * r738228;
        double r738230 = r738229 * r738228;
        return r738230;
}

double f(double x, double y) {
        double r738231 = x;
        double r738232 = 3.0;
        double r738233 = r738231 * r738232;
        double r738234 = y;
        double r738235 = r738233 * r738234;
        double r738236 = r738235 * r738234;
        return r738236;
}

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