Average Error: 10.8 → 0.2
Time: 28.9s
Precision: 64
\[\frac{x}{y \cdot y}\]
\[\frac{x}{y} \cdot \frac{1}{y}\]
\frac{x}{y \cdot y}
\frac{x}{y} \cdot \frac{1}{y}
double f(double x, double y) {
        double r14847885 = x;
        double r14847886 = y;
        double r14847887 = r14847886 * r14847886;
        double r14847888 = r14847885 / r14847887;
        return r14847888;
}

double f(double x, double y) {
        double r14847889 = x;
        double r14847890 = y;
        double r14847891 = r14847889 / r14847890;
        double r14847892 = 1.0;
        double r14847893 = r14847892 / r14847890;
        double r14847894 = r14847891 * r14847893;
        return r14847894;
}

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

Derivation

  1. Initial program 10.8

    \[\frac{x}{y \cdot y}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity10.8

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot y}\]
  4. Applied times-frac0.2

    \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y}}\]
  5. Final simplification0.2

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

Reproduce

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