Average Error: 0.4 → 0.2
Time: 36.7s
Precision: 64
\[\frac{x \cdot 100.0}{x + y}\]
\[\frac{100.0}{x + y} \cdot x\]
\frac{x \cdot 100.0}{x + y}
\frac{100.0}{x + y} \cdot x
double f(double x, double y) {
        double r36189086 = x;
        double r36189087 = 100.0;
        double r36189088 = r36189086 * r36189087;
        double r36189089 = y;
        double r36189090 = r36189086 + r36189089;
        double r36189091 = r36189088 / r36189090;
        return r36189091;
}

double f(double x, double y) {
        double r36189092 = 100.0;
        double r36189093 = x;
        double r36189094 = y;
        double r36189095 = r36189093 + r36189094;
        double r36189096 = r36189092 / r36189095;
        double r36189097 = r36189096 * r36189093;
        return r36189097;
}

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.0} \cdot \frac{100.0}{x + y}\]

Derivation

  1. Initial program 0.4

    \[\frac{x \cdot 100.0}{x + y}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.4

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

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

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

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

Reproduce

herbie shell --seed 2019165 
(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)))