Arithmetic Functions
- atan2(Y,X)
- Returns the arctangent of Y/X in the range
-PI to PI.
- cos(EXPR)
- cos EXPR
-
Returns the cosine of EXPR (expressed in radians).
If EXPR is omitted takes cosine of $_.
- exp(EXPR)
- exp EXPR
-
Returns
e
to the power of EXPR.
If EXPR is omitted, gives exp($_).
- int(EXPR)
- int EXPR
-
Returns the integer portion of EXPR.
If EXPR is omitted, uses $_.
- log(EXPR)
- log EXPR
-
Returns logarithm (base
e)
of EXPR.
If EXPR is omitted, returns log of $_.
- rand(EXPR)
- rand EXPR
- rand
- Returns a random fractional number between 0 and the value of EXPR.
(EXPR should be positive.)
If EXPR is omitted, returns a value between 0 and 1.
See also srand().
- sin(EXPR)
- sin EXPR
-
Returns the sine of EXPR (expressed in radians).
If EXPR is omitted, returns sine of $_.
- sqrt(EXPR)
- sqrt EXPR
-
Return the square root of EXPR.
If EXPR is omitted, returns square root of $_.
- srand(EXPR)
- srand EXPR
-
Sets the random number seed for the
rand
operator.
If EXPR is omitted, does srand(time).