But NUMF isn’t rounding, it is the display of digits.
And, to quote Dicken’s Micawber..
“Annual income twenty pounds, annual expenditure nineteen nineteen six, result happiness. Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery.”
Having in mind that you have set numf to 9, yes it is meaningful 🙂
is round(-.1) = 0 or -0 ? I think it is a bug
You are right. I think it is a bug too.
But NUMF isn’t rounding, it is the display of digits.
And, to quote Dicken’s Micawber..
“Annual income twenty pounds, annual expenditure nineteen nineteen six, result happiness. Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery.”
So yes, sometimes the -0 may be meaningful.
> But NUMF isn’t rounding
are you sure?
SQL> set numf 9
SQL> select 0.4 from dual;
0.4
—
0
SQL> select 0.6 from dual;
0.6
—
1
The same issue occurs when trying to specify column format
SQL> column num format 9
SQL> select -.1 num from dual;
NUM
---
-0
> is round(-.1) = 0 or -0 ?
0 == -0, so round(-.1) = 0 AND round(-.1) = -0
We happen to be used to represent the number zero as 0, but it seems perfectly legitime to represent it as -0 as well. Not that I like it, though….
select to_char(-0.1,’9′),round(-0.1),trunc(-0.1),ceil(-0.1) from duaL
-0 0 0 0
yes rené, but 1+1=+2, I rather say that 1+1=2 😎
“yes rené, but 1+1=+2, I rather say that 1+1=2”
I’m glad you wrote that, that was my spam protection question. 🙂