Package de.tilman_neumann.jml.powers
Class Pow2
- java.lang.Object
- 
- de.tilman_neumann.jml.powers.Pow2
 
- 
 public class Pow2 extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description Pow2()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimaldivPow2(BigDecimal x, int n)Division by the n.th power of 2.static BigDecimalmulPow2(BigDecimal x, int n)Multiplication with the n.th power of 2.static BigDecimalpow2(int n)Power of 2 with integer exponent.
 
- 
- 
- 
Method Detail- 
pow2public static BigDecimal pow2(int n) Power of 2 with integer exponent.- Parameters:
- n-
- Returns:
- 2^n
 
 - 
mulPow2public static BigDecimal mulPow2(BigDecimal x, int n) Multiplication with the n.th power of 2.- Parameters:
- x-
- n- Exponent
- Returns:
- x*2^n
 
 - 
divPow2public static BigDecimal divPow2(BigDecimal x, int n) Division by the n.th power of 2.- Parameters:
- x-
- n- Exponent
- Returns:
- x/2^n
 
 
- 
 
-