I have a quadratic equation generating 2 solutions x1,x2 and each solution generates two new solutions again. This continues to infinity.
The way I tried to implement this is using a routine with vector r=[x1,x2] as an input parameter. And use the parallel for loop to compute the next 2.
Unfortunately the loop only continues to execute the first solution of r[].
The code looks as follows:
r=[1,2];
axyz=fileopen("myfile","w");
test(r)={
parfor(i=1,2,r[i],c,
if(c<>1,filewrite(axyz,c);
test([x1(c),x2(c)]))
);
}
test(r);
Question: Is it possible to make sure that the second solution is also processed? So that the function expands into an infinite solution tree generating all solutions.