LogiView

Function 'cos'

     

This function returns the result of a trigonometric cosine function.

 

Syntax:

  {INT_VAR|FLO_VAR}= cos({NUM_EXPR})
 

I/O parameters:

{NUM_EXPR} Value to be calculated (in radian).
-  
 

Return value:

 
{INT_VAR|FLO_VAR} Integer or float value containing the result of this function.
 

Example:

  Declaration of Variables
 
10 ask(DOCU_INT_1,"Please enter a value between

              0 and 360!")

20 DOCU_FLOAT_1=cos(DOCU_INT_1)

30 put(DOCU_FLOAT_1)
 

Result: (For DOCU_INT_1 = 30)

In order to prevent errors, the float/double type must be used if results can be expected to be either very large or very small (<2^-31 or > 2^31).

Functions and commands: Mathematical Functions