On 12.05.2011 10:03, Abid H. Mujtaba wrote: > unittest > { > double x = 3.2 ; > float y = 3.2 ; > > assert( x == y ) ; > } Quite OK, IMHO: x-y = -4.76837e-08 Just regular rounding error, and we are comparing values stored with different precision. Float values quite rarely can store *exact* values. /Alexander