21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Added in: IB<br />

Changed in: 1.5<br />

Better alternative: Internal function LOG()<br />

External functions (UDFs)<br />

Description: In <strong>Firebird</strong> 1.5 and up, log(x,y) returns the the base-x logarithm of y. In <strong>Firebird</strong> 1.0.x and<br />

InterBase, it erroneously returns the base-y logarithm of x.<br />

Result type: DOUBLE PRECISION<br />

Syntax (unchanged):<br />

log (x, y)<br />

Declaration (unchanged):<br />

DECLARE EXTERNAL FUNCTION log<br />

DOUBLE PRECISION, DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

ENTRY_POINT 'IB_UDF_log' MODULE_NAME 'ib_udf'<br />

Warning<br />

Library: ib_udf<br />

Added in: IB<br />

If any of your pre-1.5 databases use log, check your PSQL and application code. It may contain workarounds<br />

to return the right results. Under <strong>Firebird</strong> 1.5 and up, any such workarounds should be removed or you'll get<br />

wrong results.<br />

Better alternative: Internal function LOG10()<br />

log10<br />

Description: Returns the 10-based logarithm of the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

log10 (number)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION log10<br />

DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

ENTRY_POINT 'IB_UDF_log10' MODULE_NAME 'ib_udf'<br />

178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!