Average Error: 0.3 → 0.3
Time: 8.5s
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 r548083 = x;
        double r548084 = 3.0;
        double r548085 = r548083 * r548084;
        double r548086 = y;
        double r548087 = r548085 * r548086;
        double r548088 = r548087 * r548086;
        return r548088;
}

double f(double x, double y) {
        double r548089 = y;
        double r548090 = x;
        double r548091 = 3.0;
        double r548092 = r548090 * r548091;
        double r548093 = r548092 * r548089;
        double r548094 = r548089 * r548093;
        return r548094;
}

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