Rounding Errors...
736764Dec 2 2009 — edited Dec 2 2009Hi everybody,
how should I/can I handle rounding errors in Oracle.
I'm using the LOG function of Oracle and for SELECT LOG(2,16) FROM DUAL; Oracle returns 3,99999999999999999999999999999999999998 which is incorrect. I cannot use the Round-Function cause my whole mathematical expression (written in Excel Syntax) is:
FLOOR(LOG(x; 2); 1)
So if I use the round function and SELECT ROUND(LOG(2,15)) FROM DUAL; would return 4 which is not correct thinking about my FLOOR(4) => 4, but the result of the mathematical expression is 3!
Any ideas on how to deal with such problems... is there somehow a datatype to use?
Thanks!