![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Fri, 14 Oct 2022 at 14:58, Taco Hoekwater via ntg-context < ntg-context@ntg.nl> wrote:
On 14 Oct 2022, at 14:26, Alan Braslau via ntg-context < ntg-context@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).