Average Error: 0.4 → 0.4
Time: 2.9s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x \cdot 100}{x + y}\]
\frac{x \cdot 100}{x + y}
\frac{x \cdot 100}{x + y}
double f(double x, double y) {
        double r814515 = x;
        double r814516 = 100.0;
        double r814517 = r814515 * r814516;
        double r814518 = y;
        double r814519 = r814515 + r814518;
        double r814520 = r814517 / r814519;
        return r814520;
}

double f(double x, double y) {
        double r814521 = x;
        double r814522 = 100.0;
        double r814523 = r814521 * r814522;
        double r814524 = y;
        double r814525 = r814521 + r814524;
        double r814526 = r814523 / r814525;
        return r814526;
}

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

Derivation

  1. Initial program 0.4

    \[\frac{x \cdot 100}{x + y}\]
  2. Final simplification0.4

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

Reproduce

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