beautypg.com

Exponential and logarithmic functions – Turning Technologies ExamView User Manual

Page 95

background image

ExamView Test Generator

95

frac

double frac(double x)

Returns the fractional part of the argument, x. The return value will always be greater than
or equal to 0 and less than 1.

int

int int(double x)

Returns the integer portion of the argument, x. If x is positive, it rounds down. If x is
negative, it rounds up.

inv

double inv(double x)

Returns the inverse of the argument, x. Actual function is 1 / x. Arguments to the function
must not be equal to zero.

max

double max(double x, double y)

Returns the larger of two values.

min

double min(double x, double y)

Returns the smaller of two values.

rand

int rand(int x)

Returns a pseudo-random number in the range 1 to the argument, x, inclusive.

sgn

int sgn(double x)

If the argument, x, is less than zero, this function returns -1. If the argument, x, is greater
than zero, this function returns 1. Otherwise it returns zero.

sqr

double sqr(double x)

Computes the positive square root of the argument, x. The argument must be greater than
or equal to zero.

sqrt

double sqrt(double x)

Computes the positive square root of the argument, x. The argument must be greater than
or equal to zero.

Exponential and Logarithmic Functions

ExamView Test Generator provides you with numerous pre-defined exponential and logarithmic functions to use when defining
variables, conditions, and user-defined functions.

exp

double exp(double x)

Calculates the exponential e to the x.

ln

double ln(double x)

Calculates the natural log of the argument, x. Arguments to the function must be greater
than zero.

log

double log(double x)

Calculates the natural log of the argument, x. Arguments to the function must be greater
than zero.

turningtechnologies.com/user-guides