Average Error: 39.4 → 11.3
Time: 16.6s
Precision: 64
\[x \gt 0.0\]
\[\frac{\sqrt{x - 1}}{x + 1} - \frac{\sqrt{x + 1}}{x - 1}\]
\[\frac{-\left(\left(\frac{14}{{x}^{4}} + \frac{22}{{x}^{6}}\right) + \frac{6}{x \cdot x}\right)}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}\]
\frac{\sqrt{x - 1}}{x + 1} - \frac{\sqrt{x + 1}}{x - 1}
\frac{-\left(\left(\frac{14}{{x}^{4}} + \frac{22}{{x}^{6}}\right) + \frac{6}{x \cdot x}\right)}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}
double f(double x) {
        double r74312 = x;
        double r74313 = 1.0;
        double r74314 = r74312 - r74313;
        double r74315 = sqrt(r74314);
        double r74316 = r74312 + r74313;
        double r74317 = r74315 / r74316;
        double r74318 = sqrt(r74316);
        double r74319 = r74318 / r74314;
        double r74320 = r74317 - r74319;
        return r74320;
}

double f(double x) {
        double r74321 = 14.0;
        double r74322 = x;
        double r74323 = 4.0;
        double r74324 = pow(r74322, r74323);
        double r74325 = r74321 / r74324;
        double r74326 = 22.0;
        double r74327 = 6.0;
        double r74328 = pow(r74322, r74327);
        double r74329 = r74326 / r74328;
        double r74330 = r74325 + r74329;
        double r74331 = 6.0;
        double r74332 = r74322 * r74322;
        double r74333 = r74331 / r74332;
        double r74334 = r74330 + r74333;
        double r74335 = -r74334;
        double r74336 = 1.0;
        double r74337 = r74322 - r74336;
        double r74338 = sqrt(r74337);
        double r74339 = r74322 + r74336;
        double r74340 = r74338 / r74339;
        double r74341 = sqrt(r74339);
        double r74342 = r74341 / r74337;
        double r74343 = r74340 + r74342;
        double r74344 = r74335 / r74343;
        return r74344;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 39.4

    \[\frac{\sqrt{x - 1}}{x + 1} - \frac{\sqrt{x + 1}}{x - 1}\]
  2. Using strategy rm
  3. Applied flip--39.4

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{x - 1}}{x + 1} \cdot \frac{\sqrt{x - 1}}{x + 1} - \frac{\sqrt{x + 1}}{x - 1} \cdot \frac{\sqrt{x + 1}}{x - 1}}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}}\]
  4. Simplified39.4

    \[\leadsto \frac{\color{blue}{\frac{x - 1}{\left(x + 1\right) \cdot \left(x + 1\right)} - \frac{x + 1}{\left(x - 1\right) \cdot \left(x - 1\right)}}}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}\]
  5. Taylor expanded around inf 11.4

    \[\leadsto \frac{\color{blue}{-\left(6 \cdot \frac{1}{{x}^{2}} + \left(14 \cdot \frac{1}{{x}^{4}} + 22 \cdot \frac{1}{{x}^{6}}\right)\right)}}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}\]
  6. Simplified11.3

    \[\leadsto \frac{\color{blue}{-\left(\left(\frac{14}{{x}^{4}} + \frac{22}{{x}^{6}}\right) + \frac{6}{x \cdot x}\right)}}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}\]
  7. Final simplification11.3

    \[\leadsto \frac{-\left(\left(\frac{14}{{x}^{4}} + \frac{22}{{x}^{6}}\right) + \frac{6}{x \cdot x}\right)}{\frac{\sqrt{x - 1}}{x + 1} + \frac{\sqrt{x + 1}}{x - 1}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sqrt(x-1)/(x+1)-sqrt(x+1)/(x-1)"
  :precision binary64
  :pre (> x 0.0)
  (- (/ (sqrt (- x 1)) (+ x 1)) (/ (sqrt (+ x 1)) (- x 1))))