Remove loggin statement
Handle floating point arithmetic problems