Average Error: 10.5 → 0.2
Time: 3.0s
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 r243339 = x;
        double r243340 = y;
        double r243341 = r243340 * r243340;
        double r243342 = r243339 / r243341;
        return r243342;
}

double f(double x, double y) {
        double r243343 = x;
        double r243344 = y;
        double r243345 = r243343 / r243344;
        double r243346 = r243345 / r243344;
        return r243346;
}

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.5
Target0.2
Herbie0.2
\[\frac{\frac{x}{y}}{y}\]

Derivation

  1. Initial program 10.5

    \[\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 2020036 +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)))