Average Error: 0.4 → 0.2
Time: 6.3s
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 r14459728 = x;
        double r14459729 = 100.0;
        double r14459730 = r14459728 * r14459729;
        double r14459731 = y;
        double r14459732 = r14459728 + r14459731;
        double r14459733 = r14459730 / r14459732;
        return r14459733;
}

double f(double x, double y) {
        double r14459734 = 100.0;
        double r14459735 = x;
        double r14459736 = y;
        double r14459737 = r14459735 + r14459736;
        double r14459738 = r14459734 / r14459737;
        double r14459739 = r14459738 * r14459735;
        return r14459739;
}

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 2019156 +o rules:numerics
(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)))