|
|
Perl Math Functions - Perl
|
Views : 384
|
|
Tagged in : Perl
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Perl Math Functions
atan2(Y,X)
Returns the arctangent of Y/X in the range
cos(EXPR)
cos EXPR
cos
Returns the cosine of EXPR (expressed in radians). If EXPR is omitted takes cosine of `$_'.
exp(EXPR)
exp EXPR
exp
Returns `e' to the power of EXPR. If EXPR is omitted, gives exp($_).
hex(EXPR)
hex EXPR
hex
Returns the decimal value of EXPR interpreted as an hex string. (To interpret strings that might start with `0' or `0x' see oct().) If EXPR is omitted, uses `$_'.
int(EXPR)
int EXPR
int
Returns the integer portion of EXPR. If EXPR is omitted, uses `$_'.
log(EXPR)
log EXPR
log
Returns logarithm (base `e') of EXPR. If EXPR is omitted, returns log of `$_'.
oct(EXPR)
oct EXPR
oct
Returns the decimal value of EXPR interpreted as an octal string. (If EXPR happens to start off with `0x', interprets it as a hex string instead.) The following will handle decimal, octal and hex in the standard notation:
$val = oct($val) if $val =~ /^0/;
If EXPR is omitted, uses `$_'.
sin(EXPR)
sin EXPR
sin
Returns the sine of EXPR (expressed in radians). If EXPR is omitted, returns sine of `$_'.
sqrt(EXPR)
sqrt EXPR
sqrt
Return the square root of EXPR. If EXPR is omitted, returns square root of `$_'. |
|
By Geethalakshmi, On - 2010-09-17 |
|
|
|