code: public static BigDecimal gamma(BigDecimal x, MathContext mathContext) {
  		return factorial(x.subtract(ONE), mathContext);
  	}
docs: Calculates the gamma function of the specified {@link BigDecimal}.
  
  <p>This implementation uses {@link #factorial(BigDecimal, MathContext)} internally,
  therefore the performance implications described there apply also for this method.
  
  <p>See: <a href="https://en.wikipedia.org/wiki/Gamma_function">Wikipedia: Gamma function</a></p>
  
  @param x the {@link BigDecimal}
  @param mathContext the {@link MathContext} used for the result
  @return the gamma {@link BigDecimal}
  @throws ArithmeticException if x-1 is a negative integer value (-1, -2, -3, ...)
  @throws UnsupportedOperationException if x is a non-integer value and the {@link MathContext} has unlimited precision
  @see #factorial(BigDecimal, MathContext)