Average Error: 9.8 → 0.2
Time: 11.2s
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 r15658938 = x;
        double r15658939 = y;
        double r15658940 = r15658939 * r15658939;
        double r15658941 = r15658938 / r15658940;
        return r15658941;
}

double f(double x, double y) {
        double r15658942 = x;
        double r15658943 = y;
        double r15658944 = r15658942 / r15658943;
        double r15658945 = r15658944 / r15658943;
        return r15658945;
}

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 2019163 +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)))