> This only helps to some extent. > > If you set I=N and J=N then with N somewhere between 113000 and 114000 > ioffset will turn negative. Thanks to all for suggestions. N=113000 is by far out of range since (as far as I can tell) the distance structure would be longer than R can presently handle, but please correct me if I'm wrong. Peter