mark dickinson vqpxmqtcgmailcom thu mar 13 2008 420 imri goldberg wrote 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 dont much like either think option 1 would cause lot confusion difficultyit changes conceptually simple operation something complicated option 2 id agree situations warning exception floatingpoint equality inequality tests might helpful warning default least easily turned fortran compilers compiletime warning believe fortrans users much likely writing sort code cares since change backwards compatible suggest added python 3 already late python 30 3 programmers still need regular maybe even rare cases special functionmethod might used could named floating_exact_eq disagree rare ive seen written code like 00 deal exceptional case else b ca similarly test ab division ab ones kind dodgy way b doesnt always guarantee ab nonzero though youre okay youre ieee 754 platform b finite numbers wanted generate random numbers open interval 00 10 randomrandom gives numbers 00 10 careful programmer might well write true x randomrandom x 00 break less fussy programmer might say chance getting 00 1 253 never going happen thoughts x x 10 set00 10 20 30 set00 10 20 mark wed 06 aug 2008 034537 0400 pythondev case floating point