|
From: Raymond T. <toy...@gm...> - 2019-06-11 15:45:26
|
>>>>> "Schorsch" == Schorsch <Dr.> writes:
>> Maxima uses Carlson's Rf function to compute the elliptic_k value.
Schorsch> thanks Ray, for clarifying that
Schorsch> IIRC, I determined the 2ULPs error bound on a system with intermediate
Schorsch> extended double precision on the x87 stack...
Ah. So you got some extra 11 bits of precision for intermediate
calculations before saving the final result as a double?
Schorsch> because only K is needed, one could give the old Gaussian algo
Schorsch> involving the https://en.wikipedia.org/wiki/Arithmetic?geometric_mean
Schorsch> a try
Good point. I knew about that, but perhaps I was lazy since I already
had Rf implemented.
Schorsch> long time ago, I found that (1-x)*(1+x) is more accurate than 1-x^2 in
Schorsch> case abs(x)>1/sqrt(2), but is outperformed by 2*(1?x)?(1?x)^2 in case
Schorsch> x> 1/2, because then, 1-x does not produce any roundoff error (see
Schorsch> Lemma of Sterbenz, which according to Sylvie Boldo in fact had been
Schorsch> coined by Kahan).
Ooh, those are neat little tricks when you want to squeeze out the
most accuracy with a fixed precision.
--
Ray
|