[an error occurred while processing this directive]
[an error occurred while processing this directive]

PERL arithmetic functions



rand expr
Returns a random fractional number between 0 and the value of EXPR where EXPR should be a positive number. If EXPR is omitted, the function returns a value between 0 and 1. See also srand below.

srand expr
Sets the random number seed for the rand operator. If EXPR is omitted, does srand time.

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

exp expr
Returns e to the power of EXPR. If EXPR is omitted, gives exp($_).

int expr
Returns the integer portion of EXPR. If EXPR is omitted, uses $_.

log expr
Returns logarithm (base e) of EXPR. If EXPR is omitted, returns log of $_.

sin expr
Returns the sine of EXPR (expressed in radians). If EXPR is omitted, returns sine of $_.

sqrt expr
Return the square root of EXPR. If EXPR is omitted, returns square root of $_.

Back to the Perl Expressions index

[an error occurred while processing this directive]