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 r854186 = x;
        double r854187 = 3.0;
        double r854188 = r854186 * r854187;
        double r854189 = y;
        double r854190 = r854188 * r854189;
        double r854191 = r854190 * r854189;
        return r854191;
}

double f(double x, double y) {
        double r854192 = x;
        double r854193 = 3.0;
        double r854194 = r854192 * r854193;
        double r854195 = y;
        double r854196 = r854194 * r854195;
        double r854197 = r854196 * r854195;
        return r854197;
}

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