You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
== :(I have given you working code that gives acceptable results for applications. Plus the ability to specify any MF range.
Я Вам дал рабочий код, дающий приемлемые результаты для прикладных задач. Плюс возможность указывать любой диапазон CЧ.
So what about the spoon?
А вам, уважаемый, известно, что между любыми, сколь угодно близкими друг к другу, вещественными числами имеется бесчисленное множество вещественных чисел ?
А известно, что интервал (0,1) по мощности эквивалентен бесконечной прямой ?
Если нет - задумайтесь об этом.
Если да - правильно формулируйте свой вопрос.
Заодно попытайтесь сказать, с какой плотностью (штук на ед. длины) вы хотите иметь генерацию СЧ ?
А может вы хотите, чтобы ваш ГСЧ генерил все числа отрезка (0,1) ?
???!!!!
"Or maybe you want your GSH to generate all numbers a segment (0,1) ?" what kind of nonsense is that ? Have you studied number theory.
Ну так а ложку?
Should I put some more in my mouth? :)
Могет быть, ещё в рот положить? :)
Here we go!
Ну поехало!Well really what can't you normalise the take yourself.
Ну поехало!Come on! 32767 pieces per unit length is fine. You could do 100000000 of course, but why?!
Ну действительно что не можешь сам нормализовать дубль.
I do this.
double ranD(int rsign,int rstep) { double sumR=0; for(int zr=1;zr<=2;zr++) { //---- string ran="0."; for(int z=1;z<=rstep;z++) { ran=ran+DoubleToStr(MathFloor((MathRand()/32767.0)*10),0); } double randou=StrToDouble(ran); if(rsign==1) { randou=2*randou-1; } sumR+=randou*randou; //---- } randou=randou/MathSqrt(sumR); //Print("randou = "+randou); return(randou); }
But....gumgum, then try this. The principle is the same, but instead of generating integers from 0 to 32767 you get about 0 to 2^30. Each number is MathRand() + MathRand()*32768. I haven't investigated how the distributions will be, but hopefully for not too demanding tasks it will be tip-top.
These are numbers of type AB in 32768 number system.
Better yet, use a dll. There is one, it immediately generates such large numbers.
gumgum, тогда попробуй вот так. Принцип тот же, но вместо генерации целых чисел от 0 до 32767 ты получишь примерно от 0 до 2^30. Каждое число - это MathRand() + MathRand()*MathRand(). Я не исследовал, как будут распределены, но надеюсь, что для не слишком требовательных задач все будет тип-топ.
Это числа вида AB в 32768-ичной системе счисления.
Tried it. It's no good there.