Average Error: 0.4 → 0.2
Time: 8.1s
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 r40833983 = x;
        double r40833984 = 100.0;
        double r40833985 = r40833983 * r40833984;
        double r40833986 = y;
        double r40833987 = r40833983 + r40833986;
        double r40833988 = r40833985 / r40833987;
        return r40833988;
}

double f(double x, double y) {
        double r40833989 = 100.0;
        double r40833990 = x;
        double r40833991 = y;
        double r40833992 = r40833990 + r40833991;
        double r40833993 = r40833989 / r40833992;
        double r40833994 = r40833993 * r40833990;
        return r40833994;
}

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.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) (/ 100.0 (+ x y)))

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