Average Error: 5.3 → 5.3
Time: 12.1s
Precision: 64
\[\frac{2}{1 + \sqrt{1 + a \cdot t}}\]
\[\frac{2}{1 + \sqrt{1 + a \cdot t}}\]
\frac{2}{1 + \sqrt{1 + a \cdot t}}
\frac{2}{1 + \sqrt{1 + a \cdot t}}
double f(double a, double t) {
        double r2669536 = 2.0;
        double r2669537 = 1.0;
        double r2669538 = a;
        double r2669539 = t;
        double r2669540 = r2669538 * r2669539;
        double r2669541 = r2669537 + r2669540;
        double r2669542 = sqrt(r2669541);
        double r2669543 = r2669537 + r2669542;
        double r2669544 = r2669536 / r2669543;
        return r2669544;
}

double f(double a, double t) {
        double r2669545 = 2.0;
        double r2669546 = 1.0;
        double r2669547 = a;
        double r2669548 = t;
        double r2669549 = r2669547 * r2669548;
        double r2669550 = r2669546 + r2669549;
        double r2669551 = sqrt(r2669550);
        double r2669552 = r2669546 + r2669551;
        double r2669553 = r2669545 / r2669552;
        return r2669553;
}

Error

Bits error versus a

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 5.3

    \[\frac{2}{1 + \sqrt{1 + a \cdot t}}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity5.3

    \[\leadsto \frac{2}{\color{blue}{1 \cdot \left(1 + \sqrt{1 + a \cdot t}\right)}}\]
  4. Final simplification5.3

    \[\leadsto \frac{2}{1 + \sqrt{1 + a \cdot t}}\]

Reproduce

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