Yesterday I realized that I have to set type to double before doing "gen" for large numeric variable. If I didn't realize this and published my research, it would have been really damaging.

Because research accuracy is the absolutely priority, I am now doing

set type double, permanently

for my codes.

But this will make my data to become too big, which is already too big. If there a command (as an alternative to gen and egen) that will save as double if the numeric is larger than, say, 5 digits?