Average Error: 10.3 → 0.2
Time: 2.1s
Precision: 64
\[\frac{x}{y \cdot y}\]
\[\frac{1}{y} \cdot \frac{x}{y}\]
\frac{x}{y \cdot y}
\frac{1}{y} \cdot \frac{x}{y}
double f(double x, double y) {
        double r280278 = x;
        double r280279 = y;
        double r280280 = r280279 * r280279;
        double r280281 = r280278 / r280280;
        return r280281;
}

double f(double x, double y) {
        double r280282 = 1.0;
        double r280283 = y;
        double r280284 = r280282 / r280283;
        double r280285 = x;
        double r280286 = r280285 / r280283;
        double r280287 = r280284 * r280286;
        return r280287;
}

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

Derivation

  1. Initial program 10.3

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

    \[\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{1}{y} \cdot \frac{x}{y}\]

Reproduce

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