Re: [Python-Dev] The Case Against Floating Point ==

2008-03-13 Thread Tiago A.O.A.
I would suggest something like a ~= b, for "approximately equal to". How approximately? Well, there would be a default that could be changed somewhere. Don't know if it's all that useful, though. Tiago A.O.A. Terry Reedy escreveu: > "Imri Goldberg" <[EMAIL PROTECTED]> wrote in message > news

Re: [Python-Dev] The Case Against Floating Point ==

2008-03-13 Thread Terry Reedy
"Imri Goldberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Most experienced programmers know that you shouldn't compare floating | point numbers with ==. As a general statement, this is wrong. Mark gave examples. Please drop the proposal. The reason for the int division chan

Re: [Python-Dev] The Case Against Floating Point ==

2008-03-13 Thread Mark Dickinson
On Thu, Mar 13, 2008 at 4:20 AM, Imri Goldberg <[EMAIL PROTECTED]> wrote: > My suggestion is to do either of the following: > 1. Change floating point == to behave like a valid floating point > comparison. That means using precision and some error measure. > 2. Change floating point == to raise an

Re: [Python-Dev] The Case Against Floating Point ==

2008-03-13 Thread Aahz
On Thu, Mar 13, 2008, Imri Goldberg wrote: > > My suggestion is to do either of the following: > 1. Change floating point == to behave like a valid floating point > comparison. That means using precision and some error measure. > 2. Change floating point == to raise an exception, with an error str