Average Error: 9.8 → 0.2
Time: 15.1s
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 r14418551 = x;
        double r14418552 = y;
        double r14418553 = r14418552 * r14418552;
        double r14418554 = r14418551 / r14418553;
        return r14418554;
}

double f(double x, double y) {
        double r14418555 = x;
        double r14418556 = y;
        double r14418557 = r14418555 / r14418556;
        double r14418558 = r14418557 / r14418556;
        return r14418558;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original9.8
Target0.2
Herbie0.2
\[\frac{\frac{x}{y}}{y}\]

Derivation

  1. Initial program 9.8

    \[\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 2019164 +o rules:numerics
(FPCore (x y)
  :name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"

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

  (/ x (* y y)))