<s>[INST] How many Taylor series terms are needed to accurately approximate $\sqrt{a+x}-\sqrt{a}$? Naive evaluation of $\sqrt{a + x} - \sqrt{a}$ when $|a| >> |x|$ suffers from catastrophic cancellation and loss of significance.
WolframAlpha gives the Taylor series for $\sqrt{a+x}-\sqrt{a}$ as:
$$\frac{x}{2 \sqrt{a}} - \frac{x^2}{8 a^{3/2}} + \frac{x^3}{16 a^{5/2}} - \frac{5 x^4}{128 a^{7/2}} + \frac{7 x^5}{256 a^{9/2}} + O(x^6)$$
which (I think) equals:
$$\sqrt{a} \left( \frac{1}{2} \left(\frac{x}{a}\right) - \frac{1}{8} \left(\frac{x}{a}\right)^2 + \frac{1}{16} \left(\frac{x}{a}\right)^3 - \frac{5}{128} \left(\frac{x}{a}\right)^4 + \frac{7}{256} \left(\frac{x}{a}\right)^5 + O\left(\left(\frac{x}{a}\right)^6\right) \right)$$
How quickly do the coeffients decrease?
How many terms are needed to reach $53$ bits of accuracy (IEEE double precision) in the result given that $10^{-300} < \left|\frac{x}{a}\right| < 1$ is known?
Alternatively, what are the threshold values of $\left|\frac{x}{a}\right|$ where the number of terms changes?
What about rounding errors, assuming each value is stored in double precision?
 [/INST] It was pointed out by Robert Israel that the series does badly when $|x| \approx |a|$, but in that case the loss of significance of the naive evaluation is small.
It was also suggested by Winther (and a since-deleted answer) to rewrite as $$\frac{x}{\sqrt{a+x}+\sqrt{a}}$$
The series for the denominator is similar to the series in the question, only with a leading constant term.  This means that when $\left|\frac{x}{a}\right|$ is small enough, the addition of terms eventually becomes insignificant in double arithmetic.
If $\left|\frac{x}{a}\right| < 2^{-52}$, $1$ term is sufficient.  Otherwise
If $\left|\frac{x}{a}\right| < 2^{-25}$, $2$ terms are sufficient.  Otherwise
If $\left|\frac{x}{a}\right| < 2^{-16}$, $3$ terms are sufficient.  Otherwise
If $\left|\frac{x}{a}\right| < 2^{-11}$, $4$ terms are sufficient.  Otherwise
If $\left|\frac{x}{a}\right| < 2^{-9}$, $5$ terms are sufficient.  Otherwise
If $\left|\frac{x}{a}\right| > 2^{-9}$, the loss of precision in the addition $a + x$ is relatively small.
But in fact, perhaps $$\frac{x}{\sqrt{a + x} + \sqrt{a}}$$ evaluated in double precision is good enough for all $|x| << |a|$ and series are unnecessary?
</s>