Name

cos

Synopsis

cos num
                  

Returns the cosine of num (expressed in radians). For the inverse cosine operation, you may use the POSIX::acos( ) function, or use this relation:

sub acos { atan2( sqrt(1 - $_[0] * $_[0]), $_[0] ) }

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.