Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Odd math

Re: Odd math

From: Dennis M. Heisler <dheisler_at_binghamton.edu>
Date: Wed, 12 Jul 2000 07:00:10 -0400
Message-Id: <10556.111779@fatcity.com>


On 7.3.4

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

2-LOG(2,4)



 2.000E-38

SQL> select trunc(round(log(2,4),38)) from dual

TRUNC(ROUND(LOG(2,4),38))


                        1

SQL> select trunc(round(log(2,4),37)) from dual;

TRUNC(ROUND(LOG(2,4),37))


                        2


Dennis

"A. Bardeen" wrote:

> Steve,
>
> It's an old bug. The workaround is to round the
> number to a precision of 38 before truncating it:
>
> SQLWKS> select trunc(round(log(2,4),38)) from dual;
> TRUNC(ROUN
> ----------
> 1
>
> HTH,
>
> -- Anita
>
> --- Steve Adams <steve.adams_at_ixora.com.au> wrote:
> > Hi All,
> >
> > Oracle 8.1.6 appears to think that ... trunc(log(2,
> > 4)) = 1.
> >
> > SQL> select trunc(log(2,4)) from dual;
> >
> > TRUNC(LOG(2,4))
> > ---------------
> > 1
> >
> > Does it reproduce on earlier versions?
> >
> > Regards,
> > Steve Adams
> > http://www.ixora.com.au/
> > http://www.oreilly.com/catalog/orinternals/
> > http://www.christianity.net.au/
> >
> > --
> > Author: Steve Adams
> > INET: steve.adams_at_ixora.com.au
> >
> > Fat City Network Services -- (858) 538-5051 FAX:
> > (858) 538-5051
> > San Diego, California -- Public Internet
> > access / Mailing Lists
> >
> --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an
> > E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> > ORACLE-L
> > (or the name of mailing list you want to be removed
> > from). You may
> > also send the HELP command for other information
> > (like subscribing).
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail – Free email you can access from anywhere!
> http://mail.yahoo.com/
> --
> Author: A. Bardeen
> INET: abardeen1_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Wed Jul 12 2000 - 06:00:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US