HP 3000 Manuals

LOG10 Function [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

LOG10 Function 

The LOG10 function returns a numeric value that is the logarithm to the
base 10 of parameter-1.  The function type is numeric.

Syntax 

     FUNCTION LOG10 (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 10
of parameter-1.

Example 

     77  NUM-LOG10    PIC 9(3)V9(5) VALUE ZERO.
           :
     COMPUTE NUM-LOG10 = FUNCTION LOG10 (50).
     DISPLAY NUM-LOG10.

The above example displays the following:

     001.69897



MPE/iX 5.0 Documentation