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 r704914 = x;
        double r704915 = 3.0;
        double r704916 = r704914 * r704915;
        double r704917 = y;
        double r704918 = r704916 * r704917;
        double r704919 = r704918 * r704917;
        return r704919;
}

double f(double x, double y) {
        double r704920 = x;
        double r704921 = 3.0;
        double r704922 = r704920 * r704921;
        double r704923 = y;
        double r704924 = r704922 * r704923;
        double r704925 = r704924 * r704923;
        return r704925;
}

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 2020083 +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))