Average Error: 0.3 → 0.2
Time: 13.0s
Precision: 64
\[\frac{x \cdot 100.0}{x + y}\]
\[\frac{x}{\frac{y + x}{\sqrt{100.0}}} \cdot \sqrt{100.0}\]
\frac{x \cdot 100.0}{x + y}
\frac{x}{\frac{y + x}{\sqrt{100.0}}} \cdot \sqrt{100.0}
double f(double x, double y) {
        double r37108481 = x;
        double r37108482 = 100.0;
        double r37108483 = r37108481 * r37108482;
        double r37108484 = y;
        double r37108485 = r37108481 + r37108484;
        double r37108486 = r37108483 / r37108485;
        return r37108486;
}

double f(double x, double y) {
        double r37108487 = x;
        double r37108488 = y;
        double r37108489 = r37108488 + r37108487;
        double r37108490 = 100.0;
        double r37108491 = sqrt(r37108490);
        double r37108492 = r37108489 / r37108491;
        double r37108493 = r37108487 / r37108492;
        double r37108494 = r37108493 * r37108491;
        return r37108494;
}

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

Derivation

  1. Initial program 0.3

    \[\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. Using strategy rm
  5. Applied add-sqr-sqrt0.2

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

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

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

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

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

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

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

Reproduce

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