fp_div
Previous Topic  Next Topic 

Synopsis:

       answer = fp_div(number1, number2[, decimals])


Arguments:


       number1 - The first floating point number

       number2 - The second floating point number

       [decimals] - Optional argument to specify the number of decimal places of the returned result


Description:   This function divides number1 by number2 and returns the result.    If the optional decimals argument is specified then the result will be returned with this number of decimal places,  otherwise the global default number of decimal places will be used (as specified by fp_decs()).


If a divide by zero error is encountered then the function will return the string "ERROR" and an error message will be written to the error log.


Returns:   Returns the result of dividing number1 by number2 or the string "ERROR" if a divide by zero error is encountered.