fix type checking and add digits10_of(Float)
fix bug when value is less than 1.0