imri goldberg mafilaztigmailcom heya ive using python development years didnt participate much work python ive decided take shot even small one first subject hand experienced programmers know shouldnt compare floating point numbers want check floating point equality usually decide precision check either absolute error relative error another option use decimal module hence floating point isnt used maybe except rare circumstances would even venture say possible static checkers emit warnings floating point hand beginner programmers usually use mistake surprised strange results sometimes get back suggestion either following 1 change floating point behave like valid floating point comparison means using precision error measure 2 change floating point raise exception error string suggesting using precision comparison decimal module since change backwards compatible suggest added python 3 personally prefer second option raise exception clearer less confusing arguments suggestion 1 change breaks existing programs believe likely triggers hidden bugs since suggestion change python 3 programs likely broken changes well need changed anyway 2 change breaks compatibility clike languages agree however already agreed change operator even stronger break arguments changing operator apply well 3 programmers still need regular maybe even rare cases special functionmethod might used could named floating_exact_eq tried looking material subject plenty material floating point code right didnt find suggestion similar one also wrote suggestion blog discussed little bit python ill glad read peoples thoughts cheers imri imri goldberg wwwalgorithmcoilblogs wwwimricoil insert signature _______________________________________________ pythondev mailing list pythondevpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom wed 06 aug 2008 094003 0200 pythondev case floating point