[NTG-context] atan2 function

luigi scarso luigi.scarso at gmail.com
Fri Oct 14 15:05:18 CEST 2022

On Fri, 14 Oct 2022 at 14:58, Taco Hoekwater via ntg-context <
ntg-context at ntg.nl> wrote:

> > On 14 Oct 2022, at 14:26, Alan Braslau via ntg-context <
> ntg-context at ntg.nl> wrote:
> >
> > Are you using MP in scaled integer or in doubleprecision mode?
> >
> > I have not looked into the MP angle operator code, but my suspicion is
> that it is based on some super-clever John Hobby scheme optimized for
> scaled integer calculations.
> The scaled version of “angle” is a handwritten approximation in web, not
> using
> any math library. I really doubt that that code is faster than calling
> atan2()
> on a modern machine, but I’ve kept it in because using a lib might give
> slightly
> different results.

iirc, in metapost  the whole scaled number system has no dependency  from
any external math library
(I have not checked the lmtx source yet).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20221014/192f5702/attachment.htm>

More information about the ntg-context mailing list