Information For
High School,
Undergraduates,
Staff...
Future Students
High School Students
Undergraduates
Postgraduate Coursework
Postgraduate Research
Current Students
Undergraduates
Postgraduate Coursework
Postgraduate Research
Help & Resources
Alumni
Job Search
Tutoring
Email Redirection
Marketplace
Industry
Advertise Jobs
Sponsorship
On-campus presentations
Industrial Training
Staff
CSE Phonelist
Work Units
myCSE
Calendar
Our School
Research
Scholarships
News & Events
OHS
Contact Us
Home
» Help & Resources
» PERL -- Arithmetic Functions
Help & Resources
For Students
For Staff
For Computing
Arithmetic Functions
atan
2(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
).
Print page
Back to top
Page last updated 07.12.10