[metapost] Metafun : is "atan" the arctangent function?

Aditya Mahajan adityam at umich.edu
Mon Jan 13 02:49:57 CET 2014


On Sun, 12 Jan 2014, John Kitzmiller wrote:

> On Jan 12, 2014, at 5:08 PM, Franck Pastor <franck.pastor at me.com> wrote:
>
>> In each of these three examples Dirk's and Dan's definitions win the contest… But I'm not able to explain why.
>
> Happy to lose the contest as it looks like we will all win in the end thanks to Franck's sharp eye!
>
> I used arguments from .1 to 1.1 step .1 when testing and was working with degrees as output so atan(1) = 45. The consistency of atan vs. atand needs 'attending' to.
>
> btw I extended the series out a bit in mp-tool and it did not converge 
> quickly.

If you need a more elaborate approximation:

http://www.opensource.apple.com/source/Libm/Libm-315/Source/Intel/atan.c

I don't know how it will perform with scaled numbers.

Aditya


More information about the metapost mailing list