Hi,
I wrote this code to generate a series of complex number, e^i2??, and ? is between 0 to 1. Then, I sum them up. I expect the result should be very close to zero, but the value calculation giving me is a little large around ± 100.
You can think of it as doing a random walk in the complex plane with unit steps and random directions every step. Doesn’t mean you always end up where you started.