Tim Vale wrote:

> The basic 5.6 Perl build is missing tangent 'tan()' and arctangent 'atn()'
> functions :( and I don't want to use posix module etc as the script has to
> run on a clean build - don't ask - far too complicated to explain.
> 
> So - does any budding mathematicians out there please know how to emulate
> these two functions using the simple math functions that are available ?
> 
> Is there some correlation with sine and cosine etc ?
> 
> I missed that day at school - I guess. 

And didn't scan the man pages either I guess. :)

    atan2 Y,X
            Returns the arctangent of Y/X in the range -PI to PI.

            For the tangent operation, you may use the "Math::Trig::tan"
            function, or use the familiar relation:

                sub tan { sin($_[0]) / cos($_[0])  }


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to