implement rounding on arbitrary base