test to check exponential piecewise sum