code: public static BigDecimal toBigDecimal(String string, MathContext mathContext) {
  		int len = string.length();
  		if (len < 600) {
  			return new BigDecimal(string, mathContext);
  		}
  
  		int splitLength = len / (len >= 10000 ? 8 : 5);
  		return toBigDecimal(string, mathContext, splitLength);
  	}
docs: Creates a {@link BigDecimal} from the specified <code>String</code> representation.
  
  <p>This method is equivalent to the String constructor {@link BigDecimal#BigDecimal(String, MathContext)}
  but has been optimized for large strings (several thousand digits).</p>
  
  @param string the string representation
  @param mathContext the {@link MathContext} used for the result
  @return the created {@link BigDecimal}
  @throws NumberFormatException if <code>string</code> is not a valid representation of a {@link BigDecimal}
  @throws ArithmeticException if the result is inexact but the rounding mode is {@code UNNECESSARY}
  @see BigDecimal#BigDecimal(String, MathContext)
  @see #toBigDecimal(String)