Did you solve it?

By the way, Mellis solution doesn't really get up to your needs. We need one more bit:

(random(1) << 30) + (random(32768) << 15) + random(32768);

If anyone is intrested in a deeper explanation, here is my late-night go:

The random() function can random a highest number of 32,767 which would be it returns 15 bits of random data, so in order to get a larger number we need to connect two or more of those 15 bit chunks.

What we are doing here: (random(32768) << 15) is simply that we push randomed bits 15 bits forward on the variable:

00000000 00000000 0xxxxxxx xxxxxxxx gets into:

<----15 steps

00xxxxxx xxxxxxxx x0000000 00000000

Then we add with the next chunk of random data:

00xxxxxx xxxxxxxx x0000000 00000000 +

00000000 00000000 0xxxxxxx xxxxxxxx =

00xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx

Oh, i noticed now that your maximum random number doesn't follow any 2^x number... ok, lets see...

We need to find the largest exponentation in the number:

1 576 800 000 - 1 073 741 824 = 503 058 176

Now we do the same with our result: 503 058 176

503 058 176 - 268 435 456 = 234 622 720

234 622 720 - 134 217 728 = 100 404 992

Oh heck, i am too tired, just look up which bits in 1 576 800 000 are 1 and make one random(2^x) for each of them where x is the position of the bit (fir example if first bit (bit numer 0) is true, max random is 2 ^ 0 = 1. If the maximum gets over 32 767 just split together like i explained above.

Goodnight!