Average Error: 0.3 → 0.2
Time: 7.3s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[x \cdot \frac{100}{x + y}\]
\frac{x \cdot 100}{x + y}
x \cdot \frac{100}{x + y}
double f(double x, double y) {
        double r402568 = x;
        double r402569 = 100.0;
        double r402570 = r402568 * r402569;
        double r402571 = y;
        double r402572 = r402568 + r402571;
        double r402573 = r402570 / r402572;
        return r402573;
}

double f(double x, double y) {
        double r402574 = x;
        double r402575 = 100.0;
        double r402576 = y;
        double r402577 = r402574 + r402576;
        double r402578 = r402575 / r402577;
        double r402579 = r402574 * r402578;
        return r402579;
}

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 *-un-lft-identity0.3

    \[\leadsto \frac{x \cdot 100}{\color{blue}{1 \cdot \left(x + y\right)}}\]
  4. Applied times-frac0.2

    \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{100}{x + y}}\]
  5. Simplified0.2

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

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

Reproduce

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