Average Error: 0.3 → 0.2
Time: 1.7s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x}{\frac{x + y}{100}}\]
\frac{x \cdot 100}{x + y}
\frac{x}{\frac{x + y}{100}}
double f(double x, double y) {
        double r837119 = x;
        double r837120 = 100.0;
        double r837121 = r837119 * r837120;
        double r837122 = y;
        double r837123 = r837119 + r837122;
        double r837124 = r837121 / r837123;
        return r837124;
}

double f(double x, double y) {
        double r837125 = x;
        double r837126 = y;
        double r837127 = r837125 + r837126;
        double r837128 = 100.0;
        double r837129 = r837127 / r837128;
        double r837130 = r837125 / r837129;
        return r837130;
}

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

Derivation

  1. Initial program 0.3

    \[\frac{x \cdot 100}{x + y}\]
  2. Using strategy rm
  3. Applied associate-/l*0.2

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

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

Reproduce

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