in reply to Re^3: [s]printf %d oddity
in thread [s]printf %d oddity
create or replace function test return varchar2 as begin if (8.78 * 100 = 878) then return 'ok'; end if; return 'not ok'; end; /
They're dealing with binary and decimal conversions. Now granted, I've had to deal with rounding errors in the past, but not for trivial calculations like the one above. I still contend that in this example, where we're not dealing with repeating numbers, that a language should be able to get it rightSQL> select test from dual; TEST ------------------------------------------------------------------- ok
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: [s]printf %d oddity
by Joost (Canon) on May 20, 2005 at 11:45 UTC | |
|
Re^5: [s]printf %d oddity
by Anonymous Monk on May 20, 2005 at 11:24 UTC |