Average Error: 0.4 → 0.2
Time: 11.6s
Precision: 64
\[\frac{x \cdot 100.0}{x + y}\]
\[\frac{x}{\frac{y + x}{100.0}}\]
\frac{x \cdot 100.0}{x + y}
\frac{x}{\frac{y + x}{100.0}}
double f(double x, double y) {
        double r32823022 = x;
        double r32823023 = 100.0;
        double r32823024 = r32823022 * r32823023;
        double r32823025 = y;
        double r32823026 = r32823022 + r32823025;
        double r32823027 = r32823024 / r32823026;
        return r32823027;
}

double f(double x, double y) {
        double r32823028 = x;
        double r32823029 = y;
        double r32823030 = r32823029 + r32823028;
        double r32823031 = 100.0;
        double r32823032 = r32823030 / r32823031;
        double r32823033 = r32823028 / r32823032;
        return r32823033;
}

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 associate-/l*0.2

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

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

Reproduce

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