Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Arithmetics
Hi list
In PL/SQL, 174413 - 169281.6 (as FLOAT) results in 5131.4 as it should.
In Perl, it results in 5131.39999999999. In C++ (GCC on both Linux and MS
Windows) it results in 5131.4.
I find it pretty irritating that perl doesn't handle that correctly.
I know, it's always a problem with floating point arithmetics, but how is
it, that perl already says good bye to accurate results while PL/SQL and C
both still give the correct result ?
Is there any work around or something I have to consider when doing floating
point arithmetics in Perl ?
I need to have accurate values without rounding them for statistic
calculations.
TIA,
Stefan
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Stefan Jahnke
INET: Stefan.Jahnke_at_bov.de
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------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). Received on Wed Dec 03 2003 - 04:54:25 CST