code: public static BigDecimal tan(BigDecimal x, MathContext mathContext) {
  		checkMathContext(mathContext);
  		if (x.signum() == 0) {
  			return ZERO;
  		}
  
  		MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode());
  		BigDecimal result = sin(x, mc).divide(cos(x, mc), mc);
  		return round(result, mathContext);
  	}
docs: Calculates the tangens of {@link BigDecimal} x.
  
  <p>See: <a href="http://en.wikipedia.org/wiki/Tangens">Wikipedia: Tangens</a></p>
  
  @param x the {@link BigDecimal} to calculate the tangens for
  @param mathContext the {@link MathContext} used for the result
  @return the calculated tangens {@link BigDecimal} with the precision specified in the <code>mathContext</code>
  @throws UnsupportedOperationException if the {@link MathContext} has unlimited precision