Average Error: 0.1 → 0.1
Time: 10.3s
Precision: 64
\[\frac{a + \sqrt{b}}{1 + \sqrt{b}}\]
\[\frac{a + \sqrt{b}}{1 + \sqrt{b}}\]
\frac{a + \sqrt{b}}{1 + \sqrt{b}}
\frac{a + \sqrt{b}}{1 + \sqrt{b}}
double f(double a, double b) {
        double r1307568 = a;
        double r1307569 = b;
        double r1307570 = sqrt(r1307569);
        double r1307571 = r1307568 + r1307570;
        double r1307572 = 1.0;
        double r1307573 = r1307572 + r1307570;
        double r1307574 = r1307571 / r1307573;
        return r1307574;
}

double f(double a, double b) {
        double r1307575 = a;
        double r1307576 = b;
        double r1307577 = sqrt(r1307576);
        double r1307578 = r1307575 + r1307577;
        double r1307579 = 1.0;
        double r1307580 = r1307579 + r1307577;
        double r1307581 = r1307578 / r1307580;
        return r1307581;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{a + \sqrt{b}}{1 + \sqrt{b}}\]
  2. Final simplification0.1

    \[\leadsto \frac{a + \sqrt{b}}{1 + \sqrt{b}}\]

Reproduce

herbie shell --seed 1 
(FPCore (a b)
  :name "(a+sqrt(b))/(1+sqrt(b))"
  :precision binary64
  (/ (+ a (sqrt b)) (+ 1 (sqrt b))))