LogiView

Function 'ln'

     

This function returns the result of the natural logarithm (reverse function for the natural exponential function 'exp').

 

Syntax:

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

I/O parameters:

{NUM_EXPR} Value to be calculated.
-  
 

Return value:

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

Example:

  Declaration of Variables
 
 10 ask(DOCU_FLOAT_1,"Please enter a value!")	
 20 DOCU_FLOAT_2 = ln(DOCU_FLOAT_1)	
 30 put(DOCU_FLOAT_2)
  Result: (For DOCU_FLOAT_1 = 1,2)
 
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: Mathematics