Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

FLOOR (LOG(x,y)) providing wrong values in some cases

3138226Feb 2 2019 — edited Feb 2 2019

Am trying to execute " select floor(log (2,4)) result from dual " which should give the result as 2 but receiving wrong answer as could be seen below.

SQL> select floor(2) result from dual;

    RESULT
----------
         2

SQL> select log (2,4) result from dual;

    RESULT
----------
         2

SQL> select floor(log (2,4)) result from dual;

    RESULT
----------
         1

Am I doing something wrong?

Comments

Post Details

Added on Feb 2 2019
5 comments
287 views