Well I hesitate to talk about making the values from a PRNG "more random" because I don't trust my subjective point of view to be a good judge of randomness.
I guess you just want a sample set of numbers whose members differ by a great order of magnitude. In that case, simply reject numbers from rand() (or your choice of RNG) that are too small in difference for your liking from some previous result.
I did something not too complicated:
Code:
#include <ctime>
#include <cstdlib>
#include <iostream>
#include <cmath>
int pickFromRange(int min, int max)
{
return min + std::rand() % (max - min);
}
int main()
{
std::srand(static_cast<unsigned long>(time(0)));
int previous, current;
current = pickFromRange(100000, 999999);
for (int loop = 0; loop < 5; loop++) {
std::cout<<current<<endl;
do {
previous = current;
current = pickFromRange(100000, 999999);
} while (std::abs(current - previous) < 100000);
}
}
While results can vary from run to run, I got this back:
943165
455593
210764
500128
870009
which looks pretty random.