improved get_precision()