I can't make the Compiler work either! Get a false statement. Maybe Acer can explain why it works for him and not us? Anyway it works, because of the try command. Apparently the evalhf command is speeding up things quite a lot. I assume the compiler - if it worked - would make it even faster?
I have edited the code a bit, so as to suit myself. I changed the L vector, adding 0 and 1, just for logical reasons.
Carl: In a previous comment you suggested to remove my variable broekdel, but I have introduced it again, because it increases the execution time, when the program need to calculate the left hand side in A[number] - j > L[n] again and again. In a previous version of my code it increased time from 14 sec to 16 sec. Now it is less, though.
One last thing I would like is to use the parallelism suggested by Carl, but I am not sure how to combine your earlier code with Acers.
Here is my newest version: Simulation3.mw
Again thanks a lot! I really appreciate your contributions.