[metapost] arclength() tolerances
Taco Hoekwater
taco at elvenkind.com
Thu Apr 3 10:32:02 CEST 2014
Hi Hartmut,
On 02 Apr 2014, at 21:10, Hartmut Henkel <hartmut_henkel at gmx.de> wrote:
> Hi,
>
> in metapost there seem to be absolute tolerance values for iterative
> algorithms like arclength() even in the double numbersystem:
Yes, the arc_test() routine (the core or arclength/arctime) uses a predefined
tolerance of unity/4096. While it is clear to me why it needs a tolerance
setting, it is not clear why that precise value, nor does lowering it actually
help, it just makes mp run slower:
With tolerance=1E-8:
0.031477030364784685, 31415.995269569834
real 0m1.606s
user 0m1.601s
sys 0m0.003s
With tolerance=1E-9:
0.031477030364784685, 31415.995269569834
real 1m40.888s
user 1m40.820s
sys 0m0.034s
Maybe there is some intrinsic error in the approximation code? One of the
more important reasons why I will quit developing metapost is that I do not
really understand any of this computational stuff, nor can I easily grasp the
theory behind it when attempting to educate myself.
Best wishes,
Taco
More information about the metapost
mailing list