Average Error: 0.3 → 0.2
Time: 1.9s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x}{\frac{x + y}{100}}\]
\frac{x \cdot 100}{x + y}
\frac{x}{\frac{x + y}{100}}
double f(double x, double y) {
        double r762361 = x;
        double r762362 = 100.0;
        double r762363 = r762361 * r762362;
        double r762364 = y;
        double r762365 = r762361 + r762364;
        double r762366 = r762363 / r762365;
        return r762366;
}

double f(double x, double y) {
        double r762367 = x;
        double r762368 = y;
        double r762369 = r762367 + r762368;
        double r762370 = 100.0;
        double r762371 = r762369 / r762370;
        double r762372 = r762367 / r762371;
        return r762372;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.2
Herbie0.2
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.3

    \[\frac{x \cdot 100}{x + y}\]
  2. Using strategy rm
  3. Applied associate-/l*0.2

    \[\leadsto \color{blue}{\frac{x}{\frac{x + y}{100}}}\]
  4. Final simplification0.2

    \[\leadsto \frac{x}{\frac{x + y}{100}}\]

Reproduce

herbie shell --seed 2019354 +o rules:numerics
(FPCore (x y)
  :name "Development.Shake.Progress:message from shake-0.15.5"
  :precision binary64

  :herbie-target
  (* (/ x 1) (/ 100 (+ x y)))

  (/ (* x 100) (+ x y)))