Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Steven D'Aprano
On 29/09/12 07:27, Devin Jeanpierre wrote: On Fri, Sep 28, 2012 at 8:37 AM, Steven D'Aprano wrote: [...] I'm not impressed. He sprouts off about how you can't use Python on mobile devices, when you can. What makes you think his opinions on breaking working code just because he thinks he knows

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Steven D'Aprano
On 29/09/12 11:30, Alan Gauld wrote: On 28/09/12 13:15, Mark Lawrence wrote: from Calvin Spealman is typical "Also, I'd be completely in support of dropping round() and agree it gets misused and leads to too much confusion. We should promote the right ways, and sometimes to show the right path

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Alan Gauld
On 28/09/12 13:15, Mark Lawrence wrote: from Calvin Spealman is typical "Also, I'd be completely in support of dropping round() and agree it gets misused and leads to too much confusion. We should promote the right ways, and sometimes to show the right path you need to lock another door and thro

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Mark Lawrence
On 28/09/2012 22:07, eryksun wrote: On Fri, Sep 28, 2012 at 9:17 AM, Mark Lawrence wrote: On 28/09/2012 13:37, Steven D'Aprano wrote: Deprecating and dropping features causes pain to developers who are already using them correctly. There is strong opposition on deprecating round. And there

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Devin Jeanpierre
On Fri, Sep 28, 2012 at 8:37 AM, Steven D'Aprano wrote: > On 28/09/12 22:15, Mark Lawrence wrote: > >> The Python round function is itself problematic. The idea of deprecating >> it is currently being discussed on Python ideas. This quote from Calvin >> Spealman is typical "Also, I'd be completely

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread eryksun
On Fri, Sep 28, 2012 at 9:17 AM, Mark Lawrence wrote: > On 28/09/2012 13:37, Steven D'Aprano wrote: > >> Deprecating and dropping features causes pain to developers who are >> already using them correctly. There is strong opposition on deprecating >> round. > > And there is strong support for depr

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Mark Lawrence
On 28/09/2012 13:37, Steven D'Aprano wrote: On 28/09/12 22:15, Mark Lawrence wrote: Deprecating and dropping features causes pain to developers who are already using them correctly. There is strong opposition on deprecating round. And there is strong support for deprecating round. Personall

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Steven D'Aprano
On 28/09/12 22:15, Mark Lawrence wrote: The Python round function is itself problematic. The idea of deprecating it is currently being discussed on Python ideas. This quote from Calvin Spealman is typical "Also, I'd be completely in support of dropping round() and agree it gets misused and leads

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Dave Angel
On 09/19/2012 02:27 PM, Andrew Tritt wrote: > Hello, > > I am new to python, and I was experimenting with the round function, and > came across what appears to be a bug in floating point rounding. I am > guessing there is a valid explanation for it. Welcome to the Python tutor; hope you enjoy lea

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Mark Lawrence
On 28/09/2012 12:56, Oscar Benjamin wrote: On 19 September 2012 19:27, Andrew Tritt wrote: Hello, I am new to python, and I was experimenting with the round function, and came across what appears to be a bug in floating point rounding. I am guessing there is a valid explanation for it. When

Re: [Tutor] floating point rounding inconsistency

2012-09-28 Thread Oscar Benjamin
On 19 September 2012 19:27, Andrew Tritt wrote: > Hello, > > I am new to python, and I was experimenting with the round function, and > came across what appears to be a bug in floating point rounding. I am > guessing there is a valid explanation for it. > > When I round the floating points 10.6[0

[Tutor] floating point rounding inconsistency

2012-09-28 Thread Andrew Tritt
Hello, I am new to python, and I was experimenting with the round function, and came across what appears to be a bug in floating point rounding. I am guessing there is a valid explanation for it. When I round the floating points 10.6[0-9]5 to two decimal places, it rounds as expected for 6 of the