da Silva, Joe wrote:
Well, I haven't seen the computations, but if you are happy that they are "sound" and that they will be more accurate than the existing algorithm, then I agree that you should use them.
I've made sure that they're mathematically correct (i.e., if you assume exact arithmetic), and that there can't be negative arguments to `SqRt', even with rounding (proof: in `SqRt ((Abs (z) + Abs (Re (z))) / 2)', both Abs (z) and Abs (Re (z)) are >= 0, rounding can't change that; `SqRt ((Abs (z) - Abs (Re (z))) / 2)' is only done if Abs (Im (z)) > Abs (Re (z)) and therefore Abs (z) > SqRt (2) * Abs (Re (z)) which is enough to guarantee that Abs (z) >= Abs (Re (z)) even after rounding).
I haven't done a general error analysis myself, I take Emil's word for it.
Frank