/*
 * $Id$
 */

/*
 * The following parts are Copyright of the individual authors.
 * www - http://www.harbour-project.org
 *
 * Copyright 2000 Luiz Rafael Culik <culik@sl.conex.net>
 *    Documentation for: ABS(),EXP(),LOG(),INT(),MAX()
 *    MIN(),SQRT(),ROUND()
 * See doc/license.txt for licensing terms.
 *
 */

/*  $DOC$
 *  $FUNCNAME$
 *      ABS()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Return the absolute value of a number.
 *  $SYNTAX$
 *      ABS(<nNumber>) --> <nAbsNumber>
 *  $ARGUMENTS$
 *      <nNumber> Any number   
 *  $RETURNS$
 *      <nAbsNumber> The absolute numeric value    
 *  $DESCRIPTION$
 *      This function yeilds the absolute value of the numeric value or
 *      expression <nNumber>   
 *  $EXAMPLES$
 *      Proc Main()
 *
 *      Local nNumber:=50
 *      Local nNumber1:=27
 *      cls
 *
 *      qout(nNumber-nNumber1)
 *      qout(nNumber1-nNumber)
 *      qout(ABS(nNumber-nNumber1))
 *      qout(ABSnNumber1-nNumber))
 *      qout(ABS( -1 * 345))
 *  </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant       
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      EXP()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      EXP()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Calculates the exponential of a real number
 *  $SYNTAX$
 *      EXP( <nNumber> ) --> <nExpoent>
 *  $ARGUMENTS$
 *      <nNumber> Any  real number   
 *  $RETURNS$
 *      <nExpoent> The expoent number of <nNumber>   
 *  $DESCRIPTION$
 *      This function returns the exponential of any given real number
 *      <nNumber>          
 *  $EXAMPLES$
 *      ? EXP(632512)
 *      </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant.   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      LOG()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      INT()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Return the integer port of a numeric value
 *  $SYNTAX$
 *      INT( <nNumber> ) --> <nIntNumber>
 *  $ARGUMENTS$
 *      <nNumber> Any  numeric value 
 *  $RETURNS$
 *      <nIntNumber> The integer portion of the numeric value   
 *  $DESCRIPTION$
 *      This function convert a numeric expression to an integer. all decimals
 *      digit are truncated.This function does not round a value upward or
 *      downward;it merely truncated a numeric expression.  
 *  $EXAMPLES$
 *      SET Decimal to 5   
 *      ? INT(632512.62541)
 *      ? INT(845414111.91440)
 *      </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant.   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      ROUND(),STRZERO()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      LOG()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Returns the natural logarithm of a number
 *  $SYNTAX$
 *      LOG( <nNumber> ) --> <nLog>
 *  $ARGUMENTS$
 *      <nNumber> Any numeric expression  
 *  $RETURNS$
 *      <nExpoent> The natural logaritmh of <nNumber>   
 *  $DESCRIPTION$
 *      This function will return the natural logarithm of the number <nNumber>.  
 *      If <nNumber> is 0 or is less them 0,a numeric overflow condition exist,
 *      witch is depicted on the display device as a series of asterisks.   
 *      This functions is the inverse of EXP() function.   
 *  $EXAMPLES$
 *      ? LOG(632512)
 *      </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant.   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      EXP()
 *  $END$
 */


/*  $DOC$
 *  $FUNCNAME$
 *      MAX()
 *  $CATEGORY$
 *      MATH
 *  $ONELINER$
 *      Returns the maximum of either two number or two dates.
 *  $SYNTAX$
 *      MAX(<xValue>,<xValue1>)  --> <xMax>
 *  $ARGUMENTS$
 *      <xValue> Any date or numeric value.   
 *
 *      <xValue1> Any date or numeric value.   
 *  $RETURNS$
 *      <xMax> Eighter a numeric or date value   
 *  $DESCRIPTION$
 *      This function returns the larger of the two passed espressions. If
 *      <xValue> and <xValue1> are numeric data types,the value returned by
 *      this function will be a numeric data type as well and will be the
 *      larger of the two numbers passed to it.If <xValue> and <xValue1> are
 *      date data types,the return value for this function will be a date
 *      data type as well;it will be the latest of the two dates passed to it.  
 *  $EXAMPLES$
 *      ? MAX(214514214,6251242142)
 *      ? MAX(CTOD('11/11/2000'),CTOD('21/06/2014')  
 *  </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is Ca-Clipper compliant   
 *  $PLATFORMS$
 *      All    
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      Min()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      MIN()
 *  $CATEGORY$
 *      MATH
 *  $ONELINER$
 *      Determines a minumum value or dates.
 *  $SYNTAX$
 *      MIN(<xValue>,<xValue1>)  --> <xMin>
 *  $ARGUMENTS$
 *      <xValue> Any date or numeric value.   
 *
 *      <xValue1> Any date or numeric value.   
 *  $RETURNS$
 *      <xMin> Eighter a numeric or date value   
 *  $DESCRIPTION$
 *      This function returns the smaller of the two passed espressions. The
 *      value of this function will be the result of this comparasion.If <xValue>
 *      is a numeric data type,<xValue1> must so be a numeric data type.The
 *      same may be said if <xValue> is a date data type.   
 *  $EXAMPLES$
 *      ? MIN(214514214,6251242142)
 *      ? MIN(CTOD('11/11/2000'),CTOD('21/06/2014')  
 *  </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is Ca-Clipper compliant   
 *  $PLATFORMS$
 *      All    
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      MAX()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      MOD()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Return the modulus of two numbers
 *  $SYNTAX$
 *      MOD( <nNumber>,<nNumber1>) -->  <nReturn>
 *  $ARGUMENTS$
 *      <nNumber>  Numerator in a divisional expression   
 *
 *      <nNumber1> Denominator in a divisional expression     
 *  $RETURNS$
 *      <nReturn>  Remind from the division   
 *  $DESCRIPTION$
 *      This functuion will return a value that is correspondent to the
 *      reminder of one number divided by another   
 *  $EXAMPLES$
 *      ? MOD(12,8.521)
 *      ? Mod(12,0)
 *      ? Mod(62412.5142,4522114.12014)
 *  </fixed>
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This Function is Ca-Clipper compliant   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      %
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      SQRT()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Calculates the square root of a number
 *  $SYNTAX$
 *      SQRT( <nNumber> ) --> <nSqrt>
 *  $ARGUMENTS$
 *      <nNumber> Any  numeric value
 *  $RETURNS$
 *      <nSqrt> Square root of <number>
 *  $DESCRIPTION$
 *      This function returns the square rot of <nNumber>. The precsion of
 *      this evaluation is based solly on the settings of the SET DECIMAL TO
 *      command.Any negative number passed as <nNumber> will always return a 0.
 *  $EXAMPLES$
 *      SET Decimal to 5   
 *      ? SQRT(632512.62541)
 *      ? SQRT(845414111.91440)     
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant.   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      ROUND()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      ROUND()
 *  $CATEGORY$
 *      Math
 *  $ONELINER$
 *      Rounds off a numeric expression
 *  $SYNTAX$
 *      ROUND( <nNumber>,<nPlace> ) --> <nResult>
 *  $ARGUMENTS$
 *      <nNumber> Any numeric value
 *
 *      <nPlace>  The number of places to round to
 *  $RETURNS$
 *      <nResult> Rounded number
 *  $DESCRIPTION$
 *      This function rounds off the value of <nNumber> to the number of
 *      decimal places specified by <nPlace>.If the value of <nPlace> is a
 *      negative number,the function will atempt to round <nNumber> in whole
 *      numbers;numbers from 5 through 9 will be rounded up, all others will
 *      be rounded down.
 *  $EXAMPLES$
 *      ? ROUND(632512.62541,5)
 *      ? ROUND(845414111.91440,3)     
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is CA-Clipper compliant.   
 *  $PLATFORMS$
 *      All   
 *  $FILES$
 *      Library is Rtl.lib
 *  $SEEALSO$
 *      INT(),STR(),VAL(),SET FIXED
 *  $END$
 */
