Average Error: 0.4 → 0.2
Time: 8.8s
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 r503419 = x;
        double r503420 = 100.0;
        double r503421 = r503419 * r503420;
        double r503422 = y;
        double r503423 = r503419 + r503422;
        double r503424 = r503421 / r503423;
        return r503424;
}

double f(double x, double y) {
        double r503425 = x;
        double r503426 = y;
        double r503427 = r503425 + r503426;
        double r503428 = 100.0;
        double r503429 = r503427 / r503428;
        double r503430 = r503425 / r503429;
        return r503430;
}

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.4
Target0.2
Herbie0.2
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.4

    \[\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 2019199 +o rules:numerics
(FPCore (x y)
  :name "Development.Shake.Progress:message from shake-0.15.5"

  :herbie-target
  (* (/ x 1.0) (/ 100.0 (+ x y)))

  (/ (* x 100.0) (+ x y)))