Average Error: 0.2 → 0.0
Time: 6.1s
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{a + b}{1 - a \cdot b}\]
\[\frac{1}{\frac{1 - a \cdot b}{a + b}}\]
\frac{a + b}{1 - a \cdot b}
\frac{1}{\frac{1 - a \cdot b}{a + b}}
double f(double a, double b) {
        double r2337505 = a;
        double r2337506 = b;
        double r2337507 = r2337505 + r2337506;
        double r2337508 = 1.0;
        double r2337509 = r2337505 * r2337506;
        double r2337510 = r2337508 - r2337509;
        double r2337511 = r2337507 / r2337510;
        return r2337511;
}

double f(double a, double b) {
        double r2337512 = 1.0;
        double r2337513 = 1.0;
        double r2337514 = a;
        double r2337515 = b;
        double r2337516 = r2337514 * r2337515;
        double r2337517 = r2337513 - r2337516;
        double r2337518 = r2337514 + r2337515;
        double r2337519 = r2337517 / r2337518;
        double r2337520 = r2337512 / r2337519;
        return r2337520;
}

Error

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

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

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

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

Reproduce

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