HP 3000 Manuals

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


HP COBOL II/XL Reference Manual

ASIN Function 

The ASIN function returns the arcsine of the parameter.  The function
type is numeric.

Syntax 

     FUNCTION ASIN (parameter-1)

Parameters 

parameter-1           Must be class numeric and must be between -1 and 1,
                      inclusive.

Return Value 

The value returned is the approximation of the arcsine of parameter-1 and
is between -pi/2 and pi/2, inclusive.  The return value is a numeric
value in radians.

Example 

     77  SIN-OF-ANGLE       PIC S9V9(5)  VALUE +0.70710.
     77  ANGLE-RADIANS      PIC S99V9(5) VALUE ZERO.
             :
     COMPUTE ANGLE-RADIANS = FUNCTION ASIN (SIN-OF-ANGLE).
     DISPLAY SIN-OF-ANGLE.
     DISPLAY ANGLE-RADIANS.

The above example displays the following:

     +0.70710
     +00.78538



MPE/iX 5.0 Documentation