Calculating the numerical equivalent of exponents