Average Error: 0.0 → 0.0
Time: 14.8s
Precision: 64
\[\left(\frac{b}{a} \le 3.898171832519375494306393390829904773676 \cdot 10^{-17} \land b \le 6.123233995736766035868820147291983023128 \cdot 10^{-17}\right) \land b \ge 6.123233995736766035868820147291983023128 \cdot 10^{-17}\]
\[\frac{1}{\frac{1 - a \cdot b}{a + b}}\]
\[\frac{1}{\frac{1}{a + b} - \frac{a \cdot b}{a + b}}\]
\frac{1}{\frac{1 - a \cdot b}{a + b}}
\frac{1}{\frac{1}{a + b} - \frac{a \cdot b}{a + b}}
double f(double a, double b) {
        double r2345412 = 1.0;
        double r2345413 = a;
        double r2345414 = b;
        double r2345415 = r2345413 * r2345414;
        double r2345416 = r2345412 - r2345415;
        double r2345417 = r2345413 + r2345414;
        double r2345418 = r2345416 / r2345417;
        double r2345419 = r2345412 / r2345418;
        return r2345419;
}

double f(double a, double b) {
        double r2345420 = 1.0;
        double r2345421 = a;
        double r2345422 = b;
        double r2345423 = r2345421 + r2345422;
        double r2345424 = r2345420 / r2345423;
        double r2345425 = r2345421 * r2345422;
        double r2345426 = r2345425 / r2345423;
        double r2345427 = r2345424 - r2345426;
        double r2345428 = r2345420 / r2345427;
        return r2345428;
}

Error

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{1}{\frac{1 - a \cdot b}{a + b}}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \frac{1}{\color{blue}{\frac{1}{a + b} - \frac{a \cdot b}{a + b}}}\]
  4. Final simplification0.0

    \[\leadsto \frac{1}{\frac{1}{a + b} - \frac{a \cdot b}{a + b}}\]

Reproduce

herbie shell --seed 1 
(FPCore (a b)
  :name "1/((1-a*b)/(a+b))"
  :precision binary64
  :pre (and (and (<= (/ b a) 3.89817183251937549e-17) (<= b 6.12323399573676604e-17)) (>= b 6.12323399573676604e-17))
  (/ 1 (/ (- 1 (* a b)) (+ a b))))