Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Odd math
It is the nature of IEEE floating point mathematics and affects every application running on modern computing hardware of virtually any sort . It is not a bug or an Oracle specific issue... it is a natural result of trying to represent any arbitrary real number with a fixed number of bits on a given hardware platform.
Any good reference book on numerical methods will explain issues like these and how to ensure that you aren't surprised when it comes to implementing your design. I'm also sure you can find a lot of information on the web.
Regards,
Shelby Cain
"Steve Adams" <steve.adams_at_ixora.com.au> wrote in message
news:396d2c72.208492396_at_news.eagles.bbs.net.au...
> Hi All,
>
> Thanks to all those who responded. I have been told off-line that this is
bug
> 303119 which was filed against version 7.0 but closed as "not feasible to
fix".
> Apparently, the workaround is to always round the result as follows ...
>
> SQL> select trunc(round(log(2,4),37)) from dual;
> TRUNC(ROUN
> ----------
> 2
>
> Regards,
> Steve Adams
> http://www.ixora.com.au/
> http://www.oreilly.com/catalog/orinternals/
> http://www.christianity.net.au/
>
>
> On Wed, 12 Jul 2000 04:11:57 GMT, steve.adams_at_ixora.com.au (Steve Adams)
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?
> >Any comments?
> >
> >Regards,
> >Steve Adams
> >http://www.ixora.com.au/
> >http://www.oreilly.com/catalog/orinternals/
> >http://www.christianity.net.au/
> >
>
Received on Thu Jul 13 2000 - 00:00:00 CDT
![]() |
![]() |