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

Home -> Community -> Usenet -> c.d.o.server -> Re: ROUND Function

Re: ROUND Function

From: Noons <wizofoz2k_at_yahoo.com.au.nospam>
Date: 15 Mar 2003 12:12:37 GMT
Message-ID: <Xns933FE976DCEA4Tokenthis@210.49.20.254>


Following up on Rene Nyffenegger, 15 Mar 2003:

>
> If you calculate 2319.21/14, the result is (at least on 9i on Windows);
>
> SQL> select
> to_CHAR(2319.21/14,
> '9990.0000000000000000000000000000000000000000000000000000000000')
> FROM DUAL;
>
> TO_CHAR(2319.21/14,'9990.000000000000000000000000000000000000000
> ----------------------------------------------------------------
> 165.6578571428571428571428571428571428570000000000000000000000
>
> but, it actually should be:
> 165.657857142857142857142857142857142857142857142857142857142857142857142
> 8.....

Actually, according to the documented internal precision for calculations in Oracle's quaint floating point format, the first result is quite correct. The second one is for pocket calculators that can cope with that sort of precision, or quad floating point, which no one uses in any database. <hang on, the postgres mob will jump in and claim they do...>

Well spotted, BTW.

-- 
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Sat Mar 15 2003 - 06:12:37 CST

Original text of this message

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