Issue Details (XML | Word | Printable)

Key: CORE-1936
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

The log(base, number) built-in function doesn't check parameters and delivers NAN values instead.

Created: 14/Jun/08 06:44 AM   Updated: 25/Apr/11 02:03 PM
Component/s: Engine
Affects Version/s: 2.5 Initial, 2.1.0, 2.5 Alpha 1
Fix Version/s: 2.5 Beta 1

Time Tracking:
Not Specified

Environment: Platform independent
Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
Unlike ln(number), the log(base, number) function doesn't check its parameters. Examples of what happens with illegal params follow:

SQL> select log(2, 00) from rdb$database;

                    LOG
=======================
     -1.#INF00000000000

SQL> select log(2, -2) from rdb$database;

                    LOG
=======================
     -1.#IND00000000000

SQL> select log(0, 1) from rdb$database;

                    LOG
=======================
    -0.0000000000000000

SQL> select log(0, 2) from rdb$database;

                    LOG
=======================
    -0.0000000000000000

SQL> select log(-1, 2) from rdb$database;

                    LOG
=======================
     -1.#IND00000000000

SQL> select log(-1, 0) from rdb$database;

                    LOG
=======================
     -1.#IND00000000000

SQL> select log(-1, -1) from rdb$database;

                    LOG
=======================
     -1.#IND00000000000


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Cisar added a comment - 25/Apr/11 02:03 PM
QA test added.