From: Daniel Berger Date: 2007-06-12T09:42:56+09:00 Subject: Re: Using assert_in_delta for floats with extended notation On Jun 11, 5:32 pm, "Jano Svitok" wrote: > On 6/10/07, Daniel Berger wrote: > > > > > Hi all, > > > For comparing floats I normally do something like this: > > > assert_in_delta('100.324', '100.32', 0.01) > > > However, for extended notation it breaks down: > > > assert_in_delta(1.34341429278853e+15, > > 18446744073709551616.quo(13731.24), 1.0) > > > That gives me a failure. What's the proper way to test this? > > > Thanks, > > > Dan > > assert_in_delta(1.34341429278853e+15, 18446744073709551616.quo(13731.24), 2.0) > > works. (the difference is 1.75) > > Jano Thanks. I suck. Dan