LOG Function [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
LOG Function
The LOG function returns a numeric value that is the logarithm to the
base e (natural log) of parameter-1. The function type is numeric.
Syntax
FUNCTION LOG (parameter-1)
Parameters
parameter-1 Must be class numeric and greater than zero.
Return Value
The value returned is the approximation of the logarithm to the base e of
parameter-1.
Example
77 NUM-LOG PIC 9(3)V9(5) VALUE ZERO.
:
COMPUTE NUM-LOG = FUNCTION LOG (10).
DISPLAY NUM-LOG.
The above example displays the following:
002.30258
MPE/iX 5.0 Documentation