.........
" out[i]=0; \r\n"// после десятитысячного шага итерации этот оператор начнёт выполняться в каждом цикле." } \r\n"// т.е. на выходе из цикла по любому будем иметь out[i] = 0;
.........
out[i]+=u; // если к неотрицательному числу прибавить число u большее 10000if(out[i]>10000) // то результат будет больше 10000 (true)out[i]=0; // тогда ... = 0
" out[i]=0; \r\n"// после десятитысячного шага итерации этот оператор начнёт выполняться в каждом цикле." } \r\n"// т.е. на выходе из цикла по любому будем иметь out[i] = 0;
Andrey, it's simple: out[ i ] cannot be higher than 10000, and as soon as it is higher, the array value is zeroed - by convention. Starting from u=10001, it will always be zeroed.
From here on, we will start adding even larger values of u to zero. But not too big, no more than 4 billion for sure. Hence, the value of the array is positive and exactly greater than 10000. Therefore, it is zero again. And so on. And then, outside the loop, we add i to zero.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Why?
И?...
I can't keep up with your thinking, I'm sorry.
И?...
И... then...
Andrey, it's simple: out[ i ] cannot be higher than 10000, and as soon as it is higher, the array value is zeroed - by convention. Starting from u=10001, it will always be zeroed.
From here on, we will start adding even larger values of u to zero. But not too big, no more than 4 billion for sure. Hence, the value of the array is positive and exactly greater than 10000. Therefore, it is zero again. And so on. And then, outside the loop, we add i to zero.
This is understandable. What's not clear is why my Out[] array will contain the same thing as Vladimir's array:
Because outside the loop, when the array value is already zero, i = get_global_id(0) is added to it.
Well go ahead and print out all the values.
I've almost got the sli of the 590 together, when's the next test?
I've almost got the sli of the 590 together when is the next test going to take place?