[Tutor] Python 2.5.4 - error in rounding
Neven Goršić
neven.gorsic at gmail.com
Fri May 21 17:30:48 CEST 2010
Thanks!
It's pity that Python has such unreliable functions so you never know in
advanced when you will hit new one ...
---------------------------
On Fri, May 21, 2010 at 2:14 PM, Lie Ryan <lie.1296 at gmail.com> wrote:
> On 05/21/10 20:17, Neven Goršić wrote:
> > Hi!
> >
> > I run into Python error in rounding and not know how to predict when it
> will
> > occur in order to prevent wrong result.
>
> That's because it's floating point number.
>
> > What can I do to assure accurate result?
>
> Use decimal module to do precise control over your rounding.
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100521/467adeca/attachment.html>
More information about the Tutor
mailing list