I am looking for the way of building a Table of pairs of numbers in a fast way. My true table evaluates huge functions, and I see no way and reason to show those cumbersome expressions here. Let us for simplicity consider this:
Table[{10 - x - y^2, 1/x - y}, {x, 0.1, 15, 0.5}]
In addition my real table is very long, but for the sake of shortness in this example it has a small amount of terms. Here y is a parameter taking several values. For example, y may be 0.1 and 0.5. Now, I only need the part of the table in which each term in the pair {a, b} is positive and real. In my example here, if y=0.1 one gets
{{9.89, 9.9}, {9.39, 1.56667}, {8.89, 0.809091}, {8.39, 0.525}, {7.89,
0.37619}, {7.39, 0.284615}, {6.89, 0.222581}, {6.39,
0.177778}, {5.89, 0.143902}, {5.39, 0.117391}, {4.89,
0.0960784}, {4.39, 0.0785714}, {3.89, 0.0639344}, {3.39,
0.0515152}, {2.89, 0.0408451}, {2.39, 0.0315789}, {1.89,
0.0234568}, {1.39, 0.0162791}, {0.89, 0.00989011}, {0.39,
0.00416667}, {-0.11, -0.000990099}, {-0.61, -0.00566038}, {-1.11, \
-0.00990991}, {-1.61, -0.0137931}, {-2.11, -0.0173554}, {-2.61, \
-0.0206349}, {-3.11, -0.0236641}, {-3.61, -0.0264706}, {-4.11, \
-0.029078}, {-4.61, -0.0315068}}
but I only need its first 20 terms, which have the both figures positive. It is easy to sort it after the table is build.
The problem is that the expressions entering the real table are huge, and the table is long. In addition the table is a part of a complex demonstration, which is immensely slowed down by the process of the table evaluation. As soon as I change the parameter y from one value to another, it takes about a minute to evaluate everything. Changing to ParallelTable makes the things even worse.
My question: is there a way to instruct Table to stop evaluating as soon as any of the figures in the pair becomes negative? This might considerably shorten its evaluation time.
The Menu/Help/Table mentions a possibility of some specifications in the Table operator, but I have found no examples of such specifications and cannot see, if that would be of help.