Numeric Functions

All numeric functions return a numeric result and only accept numeric arguments.

The $FABS Function

\textbf{{\char36}FABS}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Absolute value

Returns: Numeric

The $FABS function returns the absolute value of the argument n.

The $FCEIL Function

\textbf{{\char36}FCEIL}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Round up to whole number

Returns: Numeric

The $FCEIL function returns the smallest whole number that is greater than or equal to n.

The $FFLOOR Function

\textbf{{\char36}FFLOOR}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Round down to whole number

Returns: Numeric

The $FFLOOR function returns the largest whole number that is less than or equal to n.

The $FFRAC Function

\textbf{{\char36}FFRAC}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Fractional portion

Returns: Numeric

The $FFRAC function returns the fractional portion of the argument n.

The $FINT Function

\textbf{{\char36}FINT}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Truncation to whole number

Returns: Numeric

The $FINT function returns the integer portion (i.e., whole number) of the argument n.

The $FMAX Function

\textbf{{\char36}FMAX}\textbf{(}\icamhsp{0.707mm}\;\icamrange{0.66}{1}\,\bigl(\,\mathit{n_{n}}\,\bigr)\icamhsp{0.707mm}\textbf{)}

Largest value

Returns: Numeric

The $FMAX function returns the argument having the largest value from the list of numeric arguments specified. At least two arguments should be specified.

The $FMIN Function

\textbf{{\char36}FMIN}\textbf{(}\icamhsp{0.707mm}\;\icamrange{0.66}{1}\,\bigl(\,\mathit{n_{n}}\,\bigr)\icamhsp{0.707mm}\textbf{)}

Smallest value

Returns: Numeric

The $FMIN function returns the argument having the smallest value from the list of numeric arguments specified. At least two arguments should be specified.

The $FMOD Function

\textbf{{\char36}FMOD}\textbf{(}\icamhsp{0.707mm}\mathit{n_{1}},\mathit{n_{2}}\icamhsp{0.707mm}\textbf{)}

Remainder

Returns: Numeric

The $FMOD function returns the remainder of the quotient n1/n2. $FMOD generates an error if n2 is zero.

The $FNINT Function

\textbf{{\char36}FNINT}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Nearest whole number

Returns: Numeric

The $FNINT function returns the nearest whole number of the argument as $FINT(n+.5*$FSIGN(n)).

The $FSIGN Function

\textbf{{\char36}FSIGN}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Sign

Returns: Numeric

The $FSIGN function returns –1 if n is negative, 0 (zero) if n is zero and +1 if n is positive.