Average Error: 0.3 → 0.3
Time: 6.3s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[y \cdot \left(3 \cdot \left(x \cdot y\right)\right)\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
y \cdot \left(3 \cdot \left(x \cdot y\right)\right)
double f(double x, double y) {
        double r500973 = x;
        double r500974 = 3.0;
        double r500975 = r500973 * r500974;
        double r500976 = y;
        double r500977 = r500975 * r500976;
        double r500978 = r500977 * r500976;
        return r500978;
}

double f(double x, double y) {
        double r500979 = y;
        double r500980 = 3.0;
        double r500981 = x;
        double r500982 = r500981 * r500979;
        double r500983 = r500980 * r500982;
        double r500984 = r500979 * r500983;
        return r500984;
}

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. Using strategy rm
  3. Applied associate-*l*0.2

    \[\leadsto \color{blue}{\left(x \cdot \left(3 \cdot y\right)\right)} \cdot y\]
  4. Simplified0.2

    \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot 3\right)}\right) \cdot y\]
  5. Taylor expanded around 0 10.1

    \[\leadsto \color{blue}{3 \cdot \left(x \cdot {y}^{2}\right)}\]
  6. Simplified0.3

    \[\leadsto \color{blue}{y \cdot \left(3 \cdot \left(x \cdot y\right)\right)}\]
  7. Final simplification0.3

    \[\leadsto y \cdot \left(3 \cdot \left(x \cdot y\right)\right)\]

Reproduce

herbie shell --seed 2019209 
(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))