add branch dealing with negative exponential
test case for negative exponent
much elegant to find the sum of the 2**x exponents