Average Error: 0.4 → 0.2
Time: 8.2s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{\sqrt{100}}{\frac{1}{\sqrt{100}}} \cdot \frac{x}{y + x}\]
\frac{x \cdot 100}{x + y}
\frac{\sqrt{100}}{\frac{1}{\sqrt{100}}} \cdot \frac{x}{y + x}
double f(double x, double y) {
        double r528564 = x;
        double r528565 = 100.0;
        double r528566 = r528564 * r528565;
        double r528567 = y;
        double r528568 = r528564 + r528567;
        double r528569 = r528566 / r528568;
        return r528569;
}

double f(double x, double y) {
        double r528570 = 100.0;
        double r528571 = sqrt(r528570);
        double r528572 = 1.0;
        double r528573 = r528572 / r528571;
        double r528574 = r528571 / r528573;
        double r528575 = x;
        double r528576 = y;
        double r528577 = r528576 + r528575;
        double r528578 = r528575 / r528577;
        double r528579 = r528574 * r528578;
        return r528579;
}

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}{x + y}\]

Derivation

  1. Initial program 0.4

    \[\frac{x \cdot 100}{x + y}\]
  2. Simplified0.4

    \[\leadsto \color{blue}{\frac{x \cdot 100}{y + x}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.4

    \[\leadsto \frac{x \cdot 100}{\color{blue}{1 \cdot \left(y + x\right)}}\]
  5. Applied times-frac0.2

    \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{100}{y + x}}\]
  6. Simplified0.2

    \[\leadsto \color{blue}{x} \cdot \frac{100}{y + x}\]
  7. Using strategy rm
  8. Applied add-sqr-sqrt0.2

    \[\leadsto x \cdot \frac{\color{blue}{\sqrt{100} \cdot \sqrt{100}}}{y + x}\]
  9. Applied associate-/l*0.3

    \[\leadsto x \cdot \color{blue}{\frac{\sqrt{100}}{\frac{y + x}{\sqrt{100}}}}\]
  10. Using strategy rm
  11. Applied div-inv0.4

    \[\leadsto x \cdot \frac{\sqrt{100}}{\color{blue}{\left(y + x\right) \cdot \frac{1}{\sqrt{100}}}}\]
  12. Applied *-un-lft-identity0.4

    \[\leadsto x \cdot \frac{\sqrt{\color{blue}{1 \cdot 100}}}{\left(y + x\right) \cdot \frac{1}{\sqrt{100}}}\]
  13. Applied sqrt-prod0.4

    \[\leadsto x \cdot \frac{\color{blue}{\sqrt{1} \cdot \sqrt{100}}}{\left(y + x\right) \cdot \frac{1}{\sqrt{100}}}\]
  14. Applied times-frac0.3

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

    \[\leadsto \color{blue}{\left(x \cdot \frac{\sqrt{1}}{y + x}\right) \cdot \frac{\sqrt{100}}{\frac{1}{\sqrt{100}}}}\]
  16. Simplified0.2

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

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

Reproduce

herbie shell --seed 2019195 
(FPCore (x y)
  :name "Development.Shake.Progress:message from shake-0.15.5"

  :herbie-target
  (* (/ x 1.0) (/ 100.0 (+ x y)))

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