[metapost] New number systems compute cyclic path strangely

luigi scarso luigi.scarso at gmail.com
Wed May 1 21:29:17 CEST 2024


Il Mer 1 Mag 2024, 20:18 Toby Thurston <thurston at eml.cc> ha scritto:

>
>
> > On 29 Apr 2024, at 19:11, luigi scarso <luigi.scarso at gmail.com> wrote:
> >
> >
> > Hm I fear that
> >  @<Update |arc| and |t_tot| after |do_arc_test| has just returned |t|@>;
> > implicitly uses the fact that scaled is an integer type, i.e.
> > set_number_from_div (n1, arc, d1); /* n1 = (arc / d1) */
> > and
> > number_add (v1, epsilon_t);       /* v1 = n1+1 */
> > look suspicious in double mode  ( epsilon_t is not 1 but 2^-52, 1 is
> unity  )
> >
> > --
> > luigi
>
> Surely the comment should be "/* v1 = v1 + 1 */" ???
>
> I notice also that the same idiom
>
> `number add(t,epsilon_t);`
>
> is used in §414. `mp_solve_rising_cubic` that is used in arc_test, so may
> need to be fixed there as well...
>

Hm, it's always better to have an example that shows the problem...
I have committed r71144  to the texlive repo.

--
luigi

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20240501/4d7695e5/attachment.htm>


More information about the metapost mailing list.