Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → log
Firebird Home Firebird Home Prev: lnFirebird Documentation IndexUp: External functions (UDFs)Next: log10

log

Library: ib_udf

Added in: IB

Changed in: 1.5

Better alternative: Internal function LOG()

Description: In Firebird 1.5 and up, log(x,y) returns the base-x logarithm of y. In Firebird 1.0.x and InterBase, it erroneously returns the base-y logarithm of x.

Result type: DOUBLE PRECISION

Syntax (unchanged): 

log (x, y)

Declaration (unchanged): 

DECLARE EXTERNAL FUNCTION log
   DOUBLE PRECISION, DOUBLE PRECISION
   RETURNS DOUBLE PRECISION BY VALUE
   ENTRY_POINT 'IB_UDF_log' MODULE_NAME 'ib_udf'

Warning

If any of your pre-1.5 databases use log, check your PSQL and application code. It may contain workarounds to return the right results. Under Firebird 1.5 and up, any such workarounds should be removed or you'll get wrong results.

Prev: lnFirebird Documentation IndexUp: External functions (UDFs)Next: log10
Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → log