Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Slightly OT: Rounding Negative Numbers
Hi
if you include -0.870, you should also include -0.880 in which case the split will go 6:5 either way you choose.
Jack
"kkennedy" <kkennedy_at_firstpo To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> int.com> cc: (bcc: Jack van Zanen/nlzanen1/External/MEY/NL) Sent by: Subject: RE: Slightly OT: Rounding Negative Numbers root_at_fatcity.com 29-08-2002 18:48 Please respond to ORACLE-L
I have to jump in at this point since the arguments for rounding -0.875 to
-0.87 just don't seem quite right (I guess I might be Gaussian about this
thing). Let me use a different approach to this argument:
Value Rounded
-0.870 -0.87
-0.871 -0.87
-0.872 -0.87
-0.873 -0.87
-0.874 -0.87
-0.875 ?
-0.876 -0.88
-0.877 -0.88
-0.878 -0.88
-0.879 -0.88
Let's look at the distribution. If -0.875 rounds to -0.87 then 60% of the
values round to -0.87 and 40% round to -0.88. But, if -0.875 rounds to
-0.88 then 50% of the values round each way. A 50/50 split is much more
pleasing to my mind than a 60/40 split.
In my opinion, the Java example gave the wrong answer. I have to wonder if the expression (a*100) got cast into an integer before being handed to the round class. The alternative of questioning the validity of the class is less appealing.
Kevin Kennedy
First Point Energy Corporation
If you take RAC out of Oracle you get OLE! What can this mean?
-----Original Message-----
Sent: Thursday, August 29, 2002 7:18 AM
To: Multiple recipients of list ORACLE-L
After an intense "ask-your-local-mathematician"-session, here you go:
It depends ;) (That's typical math-guys, isn't it ?). If you define "round"
according to the Gauss function, then it should calculate it using absolute
values, that would be -0.88. On the other hand, "round" is usually defined
to go for the higher value from 5 on, so, since -0.87 is "higher" than
-0.875, -0.87 would be correct.
You actually don't know wether the function is implemented one or the other
way. You can just try. And if you are not content with the results, you
have
to cook your own.
Regards,
Stefan Jahnke
Consultant
BOV Aktiengesellschaft
Voice: +49 201 - 4513-298
Fax: +49 201 - 4513-149
mailto:stefan.jahnke_at_bov.de
visit our website: http://www.bov.de
subscribe to our newsletter: http://www.bov.de/presse/newsletter.asp
Behalten Sie den Ueberblick - mit dem neuen BasicOverView, unserer Seminaruebersicht fuer das 2. Halbjahr 2002. Sie haben noch kein Exemplar? Schreiben Sie eine E-Mail an mailto:qualification_at_bov.de oder rufen Sie uns an unter 0 18 03 / 73 64 62 73!
Wie Sie wissen, koennen ueber das Internet versandte E-Mails leicht unter fremden Namen erstellt oder manipuliert werden. Aus diesem Grunde bitten wir um Verstaendnis dafuer, dass wir zu Ihrem und unserem Schutz die rechtliche Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen ausschliessen.
As you are probably aware, e-mails sent via the Internet can easily be copied or manipulated by third parties. For this reason we would ask 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:wbuchan_at_uk.intasys.com]
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" mean the highest value (-0.87) or
the highest absolute magnitude (-0.88)? :)
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://www.orafaq.com
--
Author: Bill Buchan
INET: wbuchan_at_uk.intasys.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Stefan Jahnke
INET: Stefan.Jahnke_at_bov.de
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Indien bovenstaand e-mailbericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mailbericht te retourneren aan de verzender en het origineel en eventuele kopieën te verwijderen en te vernietigen.
Ernst & Young hanteert bij de uitoefening van haar werkzaamheden algemene voorwaarden, waarin een beperking van aansprakelijkheid is opgenomen. De algemene voorwaarden worden u op verzoek kosteloos toegezonden.
If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.
In carrying out its engagements, Ernst & Young applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jack van Zanen
INET: nlzanen1_at_EY.NL
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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 Fri Aug 30 2002 - 02:33:24 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |