round probleme under python 2.0

William Famy william.famy at noos.fr
Sat May 19 11:44:46 EDT 2001


good morning.

I have a problem with python 2.0 under gnu linux debian/sid.
round seem not working well. any idea to solve the problem?

Thanks for any answers.

_________________
Under Python 2.0

>>> b
2.8465416541454847
>>> [v,b]
[31.665164691616152, 2.8465416541454847]
>>> [round(v,2),round(b,2)]
[31.670000000000002, 2.8500000000000001]
>>> round(v,2)
31.670000000000002

_________________________________
under python 1.5

>>> v=31.665164691616151351651654651651
>>> v
31.6651646916
>>> b=2.84654165414548456465165651651651465
>>> b
2.84654165415
>>> [v,b]
[31.6651646916, 2.84654165415]
>>> [round(v,2),round(b,2)]
[31.67, 2.85]
>>>
--
                            \\\|///
                          \\  - -  //
                           (  @ @  )
+-----------------------oOOo-(_)-oOOo--------------------+
|Famy William  36 avenue des barattes 74000 Annecy France|
|email:william.famy at noos.fr                              |
|      william.famy at mail-enseignant.com                  |
+--------------------------------Oooo--------------------+
                           oooO   (   )
                          (   )    ) /
                           \ (    (_/
                            \_)






More information about the Python-list mailing list