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 r332242 = x;
        double r332243 = 100.0;
        double r332244 = r332242 * r332243;
        double r332245 = y;
        double r332246 = r332242 + r332245;
        double r332247 = r332244 / r332246;
        return r332247;
}

double f(double x, double y) {
        double r332248 = x;
        double r332249 = y;
        double r332250 = r332248 + r332249;
        double r332251 = 100.0;
        double r332252 = r332250 / r332251;
        double r332253 = r332248 / r332252;
        return r332253;
}

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