Average Error: 0.3 → 0.2
Time: 5.5s
Precision: 64
\[\left(\left(x \cdot 3.0\right) \cdot y\right) \cdot y\]
\[\left(\left(y \cdot 3.0\right) \cdot x\right) \cdot y\]
\left(\left(x \cdot 3.0\right) \cdot y\right) \cdot y
\left(\left(y \cdot 3.0\right) \cdot x\right) \cdot y
double f(double x, double y) {
        double r14831912 = x;
        double r14831913 = 3.0;
        double r14831914 = r14831912 * r14831913;
        double r14831915 = y;
        double r14831916 = r14831914 * r14831915;
        double r14831917 = r14831916 * r14831915;
        return r14831917;
}

double f(double x, double y) {
        double r14831918 = y;
        double r14831919 = 3.0;
        double r14831920 = r14831918 * r14831919;
        double r14831921 = x;
        double r14831922 = r14831920 * r14831921;
        double r14831923 = r14831922 * r14831918;
        return r14831923;
}

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.2
\[\left(x \cdot \left(3.0 \cdot y\right)\right) \cdot y\]

Derivation

  1. Initial program 0.3

    \[\left(\left(x \cdot 3.0\right) \cdot y\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.2

    \[\leadsto \color{blue}{\left(x \cdot \left(3.0 \cdot y\right)\right)} \cdot y\]
  4. Final simplification0.2

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

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(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))