Average Error: 10.6 → 0.2
Time: 1.8s
Precision: 64
\[\frac{x}{y \cdot y}\]
\[\frac{\frac{x}{y}}{y}\]
\frac{x}{y \cdot y}
\frac{\frac{x}{y}}{y}
double f(double x, double y) {
        double r283891 = x;
        double r283892 = y;
        double r283893 = r283892 * r283892;
        double r283894 = r283891 / r283893;
        return r283894;
}

double f(double x, double y) {
        double r283895 = x;
        double r283896 = y;
        double r283897 = r283895 / r283896;
        double r283898 = r283897 / r283896;
        return r283898;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.6
Target0.2
Herbie0.2
\[\frac{\frac{x}{y}}{y}\]

Derivation

  1. Initial program 10.6

    \[\frac{x}{y \cdot y}\]
  2. Using strategy rm
  3. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}}\]
  4. Final simplification0.2

    \[\leadsto \frac{\frac{x}{y}}{y}\]

Reproduce

herbie shell --seed 2020033 +o rules:numerics
(FPCore (x y)
  :name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
  :precision binary64

  :herbie-target
  (/ (/ x y) y)

  (/ x (* y y)))