Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


ANNUITY

The ANNUITY function returns a numeric value that approximates the ratio of an annuity paid at the end of each period, for a given number of periods, at a given interest rate, to an initial value of one. The number of periods is specified by argument-2; the rate of interest is specified by argument-1. For example, if argument-1 is zero and argument-2 is four, the value returned is the approximation of the ratio 1 / 4.

The function type is numeric.

Format
Read syntax diagramSkip visual syntax diagram>>-FUNCTION ANNUITY--(--argument-1--argument-2--)--------------><
 
argument-1
Must be class numeric. The value of argument-1 must be greater than or equal to zero.
argument-2
Must be a positive integer.

When the value of argument-1 is zero, the value returned by the function is the approximation of:

1 / argument-2

When the value of argument-1 is not zero, the value of the function is the approximation of:

argument-1 / (1 - (1 + argument-1) ** (- argument-2))


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)