[omniORB] bug in CORBA::Fixed constructor

Luke Deller ldeller at xplantechnology.com
Thu Jan 4 11:19:01 GMT 2007


...
> > >>> from decimal import Decimal
> > >>> Decimal("1.10")*Decimal("1.10")
> > >>> Decimal("1.2100")
> >
> > So apparently maintaining trailing zeros through arithmetic like
this
> > makes sense to some people.  Personally I can't see the use of this
> > behaviour in arithmetic so I'm not going to argue with you that it
> > makes sense :-)

> Here are a few reasons:
> http://www2.hursley.ibm.com/decimal/decifaq1.html#tzeros

That's a nice link.  I'm still unable to argue why 1.10*1.10 should
be 1.2100 rather than 1.21, except by appealing to efficiency
(which is the last point on the list at your link).  The extra precision
in the product is not required to express precision of measurement,
because the measurement was only precise to three significant figures,
not five.  In other examples (such as 1.11*1.11), the product needs
extra precision than the multiplicands if we want to avoid rounding,
but this is not the case for 1.10*1.10.

Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege.  If you are not
the intended recipient you must not use, distribute or copy this
email.  If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************




More information about the omniORB-list mailing list