Average Error: 0.3 → 0.2
Time: 6.4s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[\left(y \cdot x\right) \cdot \left(y \cdot 3\right)\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(y \cdot x\right) \cdot \left(y \cdot 3\right)
double f(double x, double y) {
        double r555846 = x;
        double r555847 = 3.0;
        double r555848 = r555846 * r555847;
        double r555849 = y;
        double r555850 = r555848 * r555849;
        double r555851 = r555850 * r555849;
        return r555851;
}

double f(double x, double y) {
        double r555852 = y;
        double r555853 = x;
        double r555854 = r555852 * r555853;
        double r555855 = 3.0;
        double r555856 = r555852 * r555855;
        double r555857 = r555854 * r555856;
        return r555857;
}

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 \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 pow10.3

    \[\leadsto \left(\left(x \cdot 3\right) \cdot y\right) \cdot \color{blue}{{y}^{1}}\]
  4. Applied pow10.3

    \[\leadsto \left(\left(x \cdot 3\right) \cdot \color{blue}{{y}^{1}}\right) \cdot {y}^{1}\]
  5. Applied pow10.3

    \[\leadsto \left(\left(x \cdot \color{blue}{{3}^{1}}\right) \cdot {y}^{1}\right) \cdot {y}^{1}\]
  6. Applied pow10.3

    \[\leadsto \left(\left(\color{blue}{{x}^{1}} \cdot {3}^{1}\right) \cdot {y}^{1}\right) \cdot {y}^{1}\]
  7. Applied pow-prod-down0.3

    \[\leadsto \left(\color{blue}{{\left(x \cdot 3\right)}^{1}} \cdot {y}^{1}\right) \cdot {y}^{1}\]
  8. Applied pow-prod-down0.3

    \[\leadsto \color{blue}{{\left(\left(x \cdot 3\right) \cdot y\right)}^{1}} \cdot {y}^{1}\]
  9. Applied pow-prod-down0.3

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

    \[\leadsto {\color{blue}{\left(\left(y \cdot x\right) \cdot \left(y \cdot 3\right)\right)}}^{1}\]
  11. Final simplification0.2

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

Reproduce

herbie shell --seed 2019235 +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))