Hi all,
OK, there were three goofs in the above analysis:
1) I should have used the interval [1, 2), which is the correct
interval for a normalized floating point mantissa (not [.5, 1])
2) My decimal math implied 500 linear segments in the interval,
whereas I meant to have 1000
3) As I noted earlier, the curvature does in fact vary considerably
over the interval, affecting the maximum error.
The corrected formulas show that interpolation accuracy is considerably
better than I'd originally estimated. Viktor Pracht pointed out that
curvature is expressed by the second derivative (duh) which is 1/x**3,
so the empirical result that error is eight times worse at one end of
the function than the other is correct. Fortunately, this is a win for
x>1.
So, near 1:
>>> 1/1.0005 - (1/1.001 + 1)/2
-2.4962543709872165e-07
that is, one part in about 4 million or roughly 22 bits of accuracy as
before. And near 2:
>>> 1/1.9995 - (1/1.999 + .5)/2
-3.1273451162050492e-08
that is, about one part in 32 million, or 25 bits of accuracy. This is
entirely satisfactory for our purposes.
Regards,
Daniel
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)