code: public static BigDecimal cos(BigDecimal x, MathContext mathContext) {
  		checkMathContext(mathContext);
  		MathContext mc = new MathContext(mathContext.getPrecision() + 6, mathContext.getRoundingMode());
  
  		if (x.abs().compareTo(ROUGHLY_TWO_PI) > 0) {
  			MathContext mc2 = new MathContext(mc.getPrecision() + 4, mathContext.getRoundingMode());
  			BigDecimal twoPi = TWO.multiply(pi(mc2), mc2);
  			x = x.remainder(twoPi, mc2);
  		}
  		
  		BigDecimal result = CosCalculator.INSTANCE.calculate(x, mc);
  		return round(result, mathContext);
  	}
docs: Calculates the cosine (cosinus) of {@link BigDecimal} x.
  
  <p>See: <a href="http://en.wikipedia.org/wiki/Cosine">Wikipedia: Cosine</a></p>
  
  @param x the {@link BigDecimal} to calculate the cosine for
  @param mathContext the {@link MathContext} used for the result
  @return the calculated cosine {@link BigDecimal} with the precision specified in the <code>mathContext</code>
  @throws UnsupportedOperationException if the {@link MathContext} has unlimited precision