RE: Slightly OT: Rounding Negative Numbers

2002-08-30 Thread MacGregor, Ian A.
comments given above. -Ursprüngliche Nachricht- Von: Bill Buchan [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 29. August 2002 12:43 An: Multiple recipients of list ORACLE-L Betreff: Re: Slightly OT: Rounding Negative Numbers I know the rule "round up", but does "up"

RE: Slightly OT: Rounding Negative Numbers

2002-08-29 Thread Jack van Zanen
ternal/MEY/NL) Sent by: Subject: RE: Slightly OT: Rounding Negative Numbers [EM

RE: Slightly OT: Rounding Negative Numbers

2002-08-29 Thread Naveen Nahata
for your understanding that, for your own protection and ours, we must decline all legal responsibility for the validity of the statements and comments given above. -Ursprüngliche Nachricht- Von: Bill Buchan [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 29. August 2002 12:43 An: Multip

RE: Slightly OT: Rounding Negative Numbers

2002-08-29 Thread kkennedy
that, for your own protection and ours, we must decline all legal responsibility for the validity of the statements and comments given above. -Ursprüngliche Nachricht- Von: Bill Buchan [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 29. August 2002 12:43 An: Multiple recipients of list ORACL

Re: Slightly OT: Rounding Negative Numbers

2002-08-29 Thread Bill Buchan
I know the rule "round up", but does "up" mean the highest value (-0.87) or the highest absolute magnitude (-0.88)? :) - Bill. At 09:53 28/08/2002 -0800, you wrote: >I would think -0.875 would round up therefore -0.87 is my guess. > >Rick > -- Please see the official ORACLE-L FAQ: http://ww

RE: Slightly OT: Rounding Negative Numbers

2002-08-28 Thread Khedr, Waleed
The way Java calculates round is (int)Math.floor(a + 0.5f) So you could enforce your rounding algorithm this way: import java.*; public class Round { public static void main(String[] args) { double a = 0.875; int i_rounded; if (a >= 0)

RE: Slightly OT: Rounding Negative Numbers

2002-08-28 Thread Jesse, Rich
My guess would be that neither is "wrong", but just using different rounding methods. If you are concerned about both returning different results, you could add (or subtract, based on sign) .0001 before doing the ROUND. SELECT ROUND(mynum + SIGN(mynum)*0.0001) FROM DUAL; Of course, this

Re: Slightly OT: Rounding Negative Numbers

2002-08-28 Thread Ron Rogers
Bill, I haven't tried it with negative numbers but I found round to create error where commission dollars are concerned. I use the trunc function to give the results in two decimal places where the extra half cent makes a difference over the period of time. total = trunc(sum * %,2) Select trunc(-

Re: Slightly OT: Rounding Negative Numbers

2002-08-28 Thread Rick_Cale
I would think -0.875 would round up therefore -0.87 is my guess. Rick Bill Buchan