Average Error: 0.3 → 0.2
Time: 10.3s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{\frac{x}{x + y}}{\frac{1}{100}}\]
\frac{x \cdot 100}{x + y}
\frac{\frac{x}{x + y}}{\frac{1}{100}}
double f(double x, double y) {
        double r797865 = x;
        double r797866 = 100.0;
        double r797867 = r797865 * r797866;
        double r797868 = y;
        double r797869 = r797865 + r797868;
        double r797870 = r797867 / r797869;
        return r797870;
}

double f(double x, double y) {
        double r797871 = x;
        double r797872 = y;
        double r797873 = r797871 + r797872;
        double r797874 = r797871 / r797873;
        double r797875 = 1.0;
        double r797876 = 100.0;
        double r797877 = r797875 / r797876;
        double r797878 = r797874 / r797877;
        return r797878;
}

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. Using strategy rm
  5. Applied div-inv0.2

    \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \frac{1}{100}}}\]
  6. Applied associate-/r*0.2

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

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

Reproduce

herbie shell --seed 2020043 +o rules:numerics
(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)))