Calculating floating numbers correctly