def hfloat(f, p=5):
 i = int(f)
 return (i if (i == f) else u'{0:.{p}}'.format(f, p=p))

def hfloat ( f , p = 5 ) : i = int ( f ) return ( i if ( i == f ) else u'{0:.{p}}' . format ( f , p = p ) )
convert float to value suitable for humans .