Average Error: 0.4 → 0.4
Time: 12.4s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x \cdot 100}{x + y}\]
\frac{x \cdot 100}{x + y}
\frac{x \cdot 100}{x + y}
double f(double x, double y) {
        double r344642 = x;
        double r344643 = 100.0;
        double r344644 = r344642 * r344643;
        double r344645 = y;
        double r344646 = r344642 + r344645;
        double r344647 = r344644 / r344646;
        return r344647;
}

double f(double x, double y) {
        double r344648 = x;
        double r344649 = 100.0;
        double r344650 = r344648 * r344649;
        double r344651 = y;
        double r344652 = r344648 + r344651;
        double r344653 = r344650 / r344652;
        return r344653;
}

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.4
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.4

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

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

Reproduce

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