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

Franck Pastor franck.pastor at me.com
Mon Jan 13 10:03:36 CET 2014


Le 13 janv. 2014 à 00:21, John Kitzmiller <jkitzm at gmail.com> a écrit :

> 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.

Agreed. It would be certainly better to use "atan" for angles in degrees and "invtan" for radians. It would be consistent with the notation of the inverse trigonometric functions previously defined by metafun (acos and asin return degrees whereas invcos and invsin return radians). It is the convention used in Dan Luecking's grafbase.mp by the way.

>  
> btw I extended the series out a bit in mp-tool and it did not converge quickly.
> 
> Also interesting that we are using calculators to test ;-) Thanks all!

I had mine at hand :-) By the way I also use Asymptote's interactive mode frequently, which is "per se" a great programmable pocket calculator. 

With the giant step forward for MetaPost that is the introduction of double number system representation, we will soon also be able to use MetaPost as a reliable pocket calculator (in fact I would have already done so without this bug concerning the angle function in its double numbersystem representation, that I reported a week ago).

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




More information about the metapost mailing list