Average Error: 0.3 → 0.2
Time: 14.2s
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 r36010299 = x;
        double r36010300 = 100.0;
        double r36010301 = r36010299 * r36010300;
        double r36010302 = y;
        double r36010303 = r36010299 + r36010302;
        double r36010304 = r36010301 / r36010303;
        return r36010304;
}

double f(double x, double y) {
        double r36010305 = x;
        double r36010306 = y;
        double r36010307 = r36010306 + r36010305;
        double r36010308 = 100.0;
        double r36010309 = sqrt(r36010308);
        double r36010310 = r36010307 / r36010309;
        double r36010311 = r36010305 / r36010310;
        double r36010312 = r36010311 * r36010309;
        return r36010312;
}

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 +o rules:numerics
(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)))