Ping: packet loss should be a float

Otherwise can not use the return value to check whether there was loss (loss between 0% and 1% is 0)