Average Error: 0.4 → 0.2
Time: 6.1s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\sqrt{100} \cdot \frac{x}{\frac{x + y}{\sqrt{100}}}\]
\frac{x \cdot 100}{x + y}
\sqrt{100} \cdot \frac{x}{\frac{x + y}{\sqrt{100}}}
double f(double x, double y) {
        double r505275 = x;
        double r505276 = 100.0;
        double r505277 = r505275 * r505276;
        double r505278 = y;
        double r505279 = r505275 + r505278;
        double r505280 = r505277 / r505279;
        return r505280;
}

double f(double x, double y) {
        double r505281 = 100.0;
        double r505282 = sqrt(r505281);
        double r505283 = x;
        double r505284 = y;
        double r505285 = r505283 + r505284;
        double r505286 = r505285 / r505282;
        double r505287 = r505283 / r505286;
        double r505288 = r505282 * r505287;
        return r505288;
}

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. Using strategy rm
  3. Applied associate-/l*0.2

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

    \[\leadsto \frac{x}{\frac{x + y}{\color{blue}{\sqrt{100} \cdot \sqrt{100}}}}\]
  6. Applied *-un-lft-identity0.2

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

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

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{1}{\sqrt{100}} \cdot \frac{x + y}{\sqrt{100}}}\]
  9. Applied times-frac0.2

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

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

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

Reproduce

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