Average Error: 0.3 → 0.3
Time: 3.7s
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 r790922 = x;
        double r790923 = 3.0;
        double r790924 = r790922 * r790923;
        double r790925 = y;
        double r790926 = r790924 * r790925;
        double r790927 = r790926 * r790925;
        return r790927;
}

double f(double x, double y) {
        double r790928 = x;
        double r790929 = 3.0;
        double r790930 = r790928 * r790929;
        double r790931 = y;
        double r790932 = r790930 * r790931;
        double r790933 = r790932 * r790931;
        return r790933;
}

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 +o rules:numerics
(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))