* @return
     */
    public static int magnitude(BigDecimal x) {
        //int result = x.toPlainString().length() - x.scale() - 1;
        int result = x.toBigInteger().toString().length();
        return result;
    }