Quick Search:
 
 The Oracle PL/SQL LOG Function      [Return To Index] Jump to:  

Term: LOG

Definition:
The Oracle PL/SQL LOG function returns the logarithm of a number. It accepts two arguments where first represents the base and second is the input number.

Example Syntax:

LOG(x, y)

The example above reads as, "log base x of y."

Note that x must be an integer (and not equal to one or zero) and y must be a positive number.

The LOG function takes any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype. If either argument is BINARY_FLOAT or BINARY_DOUBLE, then the function returns BINARY_DOUBLE. Otherwise the function returns NUMBER.

Example Usage:

SELECT LOG(2,8) "Log" FROM DUAL;

Log
-----
3


Related Links:

Related Code Snippets:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org