Anne Archibald wrote: > On 21/02/07, Zachary Pincus <[EMAIL PROTECTED]> wrote: > > >> A corrolary: in general do not two floating-point values for equality >> -- use something like numpy.allclose. (Exception -- equality is >> expected if the exact sequence of operations to generate two numbers >> were identical.) >> > > I really can't agree that blindly using allclose() is a good idea. For > example, allclose(plancks_constant,0) and the difference leads to > quantum mechanics... you really have to know how much difference you > expect and how big your numbers are going to be. > > Anne > "Precisely!" ;-)
Last time we had a posting like this, didn't one of the respondents include a link to something within the numpy Web docs that talks about floating point precision? DG > _______________________________________________ > Numpy-discussion mailing list > [email protected] > http://projects.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
