As I just said to Flavio, I had completely forgotten about issues with floating point numbers. Your suggestions work beautifully and are brief. Thank you! The values 0.1 to 30 cover logarithmic time intervals during which I assume my data to be complete. 1000 is an arbitrary default value for aftershocks outside my time intervals. I could have used any other name, maybe 'outside'. The '0' collects foreshock data. I hope the explanation saves your head from being scratched. ;-)