Kbase 20079: How to Call UNIX libm Function: Atan (Arctangent)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/1/2009 |
|
Status: Unverified
GOAL:
How to Call UNIX libm Function: Atan (Arctangent)
FACT(s) (Environment):
Progress 9.x
UNIX
FIX:
The following sample code shows how to call the UNIX LIBM Trigonometric function called Atan that resides in the UNIX shared library /usr/lib/libm.1, or /usr/lib/libm.so. This function returns the hyperbolic arctangent of a number.
The sample code:
DEFINE VARIABLE decResult AS DECIMAL NO-UNDO.
PROCEDURE atan EXTERNAL "/usr/lib/libm.1" CDECL:
DEFINE INPUT PARAMETER dblValue AS DOUBLE NO-UNDO.
DEFINE RETURN PARAMETER dblResult AS DOUBLE NO-UNDO.
END PROCEDURE.
RUN atan (INPUT 0.655, OUTPUT decResult).
MESSAGE "The Arctangent of 0.655 is " decResult
VIEW-AS ALERT-BOX.