HP COBOL II/XL Quick Reference Guide (31500-90015)

E- 3
| PRESENT-VALUE | Numeric | Present value of a series of |
| | | future period-end amounts at a |
| | | given discount rate. |
--------------------------------------------------------------------
| RANGE | Integer or | Value of largest parameter minus |
| | Numeric | value of smallest parameter. |
--------------------------------------------------------------------
| STANDARD- | Numeric | Standard deviation of |
| DEVIATION | | parameters. |
--------------------------------------------------------------------
- VARIANCE - Numeric - Variance of parameters. -
--------------------------------------------------------------------
Table E-6. Trigonometric Functions
--------------------------------------------------------------------
- Function - Type - Value Returned -
--------------------------------------------------------------------
- COS - Numeric - Cosine of an angle in radians. -
--------------------------------------------------------------------
- SIN - Numeric - Sine of an angle in radians. -
--------------------------------------------------------------------
- TAN - Numeric - Tangent of an angle in radians. -
--------------------------------------------------------------------
| ACOS | Numeric | Arccosine, in radians, of a |
| | | numeric value. |
--------------------------------------------------------------------
| ASIN | Numeric | Arcsine, in radians, of a |
| | | numeric value. |
--------------------------------------------------------------------
| ATAN | Numeric | Arctangent, in radians, of a |
| | | numeric value. |
--------------------------------------------------------------------
The $CONTROL POST85 Option
You must specify $CONTROL POST85 in any program that calls a COBOL
function. $CONTROL POST85 enables the COBOL functions and makes the word
FUNCTION a reserved word. If you have used the word FUNCTION as an
identifier, you must change it to another word before you can call any
COBOL functions. Otherwise, the compiler gives an error message.
ANSI85 Entry Point
You must use the ANSI85 entry point of the HP COBOL II/XL compiler to
call any COBOL functions.
ACOS
The ACOS function returns the arccosine of the parameter. The function
type is numeric.
Syntax
FUNCTION ACOS (
parameter-1
)
Parameters
parameter-1
Must be class numeric and must be between -1 and 1,
inclusive.
ANNUITY
The ANNUITY function (annuity immediate) returns a numeric value that is
the ratio of an annuity paid at the end of each period for the number of
periods specified by
parameter-2
to an initial investment of one.
Interest is earned at the rate specified by
parameter-1
and is applied at
the end of the period before the payment. The function type is numeric.
Syntax
FUNCTION ANNUITY (
parameter-1 parameter-2
)