Addition of C++ powers of integers and doubles