Programming Perl

Programming PerlSearch this book
Previous: 3.2.148 shutdownChapter 3
Functions
Next: 3.2.150 sleep
 

3.2.149 sin

sin EXPR

Sorry, there's nothing wicked about this operator. It merely returns the sine of EXPR (expressed in radians). If EXPR is omitted, it returns sine of $_.

For the inverse sine operation, you may use the POSIX::asin() function, or use this relation:

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


Previous: 3.2.148 shutdownProgramming PerlNext: 3.2.150 sleep
3.2.148 shutdownBook Index3.2.150 sleep