ActiveState homepage
docs.activestate.com
ActivePerl 5.32 Documentation
  • Get ActivePerl
      Release notes Windows installation Linux Installaton macOS Installation License
  • Get Started
      Windows Perl 5.32 docs
  • Contact Us

cos - perldoc.perl.org
Home  > Language reference > Functions > cos
Perl 5 version 32.0 documentation

cos

Perl functions A-Z | Perl functions by category | The 'perlfunc' manpage
  • cos EXPR

  • cos

    Returns the cosine of EXPR (expressed in radians). If EXPR is omitted, takes the cosine of $_ .

    For the inverse cosine operation, you may use the Math::Trig::acos function, or use this relation:

    1. sub acos { atan2( sqrt(1 - $_[0] * $_[0]), $_[0] ) }
Documentation built with Hugo using the Material theme.
ActiveState Platform   Downloads   Community   Code Recipes  
© 2020 ActiveState Software Inc. All rights reserved. Trademarks. Privacy Policy.