Re: New number systems compute cyclic path strangely

luigi scarso <[email protected]> Mon, 29 Apr 2024 09:05:46 +0200
Newsgroups gmane.comp.tex.metapost
Message-ID <CAG5iGsCxc28xYanNi3Pyr=EU=0COOO5uDjuGP1djUc9kRxV4BQ@mail.gmail.com>
--===============5630081202211515540==
Content-Type: multipart/alternative; boundary="0000000000009bb7e4061736e2e6"

--0000000000009bb7e4061736e2e6
Content-Type: text/plain; charset="UTF-8"

On Sun, 28 Apr 2024 at 17:21, Toby Thurston <[email protected]> wrote:

> This recent question on TexSE seems to have uncovered an anomaly in the
> way that MP computes the `arclength` of cyclic paths when using any of the
> new number systems.
>
> https://tex.stackexchange.com/q/716630/15036
>
>
> The poster supplied this example code
>
> beginfig(1);
> path p;
> p = (0,0){up}..{right}(200,100)..{up}(300,400)..cycle;
> len := arclength p;
> s := arctime (2500) of p;
> t := arctime (len+2500) of p;
> draw p;
> show len;% 2799
> show s;% 2.92...
> show t;% 2.67...
> show arctime arclength p of p;
> show numbersystem;
>
> endfig;
> end
>
> With the default number system the value of t is 5.92... as you might
> expect, but with any of the new number systems the value is 2.67.....
>
> The original poster as TeX.SE was using MP 2.02 but I I see this behaviour
> with  MetaPost, version 2.10 (TeX Live 2024).
>
> Toby
> --
> http://tug.org/metapost/


I will check asap.

--
luigi

--0000000000009bb7e4061736e2e6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sun, 28 Apr 2024 at 17:21, Toby Th=
urston &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>This rece=
nt question on TexSE seems to have uncovered an anomaly in the way that MP =
computes the `arclength` of cyclic paths when using any of the new number s=
ystems. =C2=A0<div><br></div><div><a href=3D"https://tex.stackexchange.com/=
q/716630/15036" target=3D"_blank">https://tex.stackexchange.com/q/716630/15=
036</a></div><div><br></div><div><br>The poster supplied this example code<=
/div><div><br></div><div><div><font face=3D"Courier New">beginfig(1);</font=
></div><div><font face=3D"Courier New">path p;</font></div><div><font face=
=3D"Courier New">p =3D (0,0){up}..{right}(200,100)..{up}(300,400)..cycle;</=
font></div><div><font face=3D"Courier New">len :=3D arclength p;</font></di=
v><div><font face=3D"Courier New">s :=3D arctime (2500) of p;</font></div><=
div><font face=3D"Courier New">t :=3D arctime (len+2500) of p;</font></div>=
<div><font face=3D"Courier New">draw p;</font></div><div><font face=3D"Cour=
ier New">show len;% 2799</font></div><div><font face=3D"Courier New">show s=
;% 2.92...</font></div><div><font face=3D"Courier New">show t;% 2.67...</fo=
nt></div><div><font face=3D"Courier New">show arctime arclength p of p;</fo=
nt></div><div><font face=3D"Courier New">show numbersystem;</font></div><di=
v><font face=3D"Courier New"><br></font></div><div><font face=3D"Courier Ne=
w">endfig;</font></div><div><font face=3D"Courier New">end</font></div></di=
v><div><br></div><div><div>With the default number system the value of t is=
 5.92... as you might expect, but with any of the new number systems the va=
lue is 2.67.....</div></div><div><br></div><div>The original poster as TeX.=
SE was using MP 2.02 but I I see this behaviour with=C2=A0<span style=3D"fo=
nt-family:inherit;font-style:inherit;font-variant-caps:inherit;white-space:=
inherit;color:rgb(12,13,14)"> MetaPost, version 2.10 (TeX Live 2024).</span=
></div><div><span style=3D"font-family:inherit;font-style:inherit;font-vari=
ant-caps:inherit;white-space:inherit;color:rgb(12,13,14)"><br></span></div>=
<div><span style=3D"font-family:inherit;font-style:inherit;font-variant-cap=
s:inherit;white-space:inherit;color:rgb(12,13,14)">Toby</span></div></div>-=
-<br>
<a href=3D"http://tug.org/metapost/" rel=3D"noreferrer" target=3D"_blank">h=
ttp://tug.org/metapost/</a></blockquote><div><br></div><div>I will check as=
ap.=C2=A0</div><div><br></div><div>--</div><div>luigi</div></div></div>

--0000000000009bb7e4061736e2e6--

--===============5630081202211515540==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
http://tug.org/metapost/

--===============5630081202211515540==--