in reply to For loop wierdness

It's just rounding errors. You'll get the same in C and in any other language which doesn't support arbitrary precision floats. If it really matters to you, use Math::BigFloat.