float_to_list/2 changed rounding and cosmetic cleanup

Changed rouding to round half-way up instead of down.
Cosmetic cleanup and error handling of additional edge cases.