Perl sin Function

Advertisements


Description

This function returns the sine of EXPR, or $_ if not specified. This function always returns a floating point.

Syntax

Following is the simple syntax for this function:

sin EXPR

sin

Return Value

This function returns the Floating Point sin value of EXPR

Example

Following is the example code showing its basic usage:

#!/usr/bin/perl

$temp = sin(4);

print "sin value of 4 is $temp";

When above code is executed, it produced following result

sin value of 4 is -0.756802495307928


Advertisements
Advertisements