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
Is it?
https://www.mql5.com/ru/docs/standardlibrary/mathematics/stat/mathsubfunctions/statmathsum
https://www.mql5.com/ru/docs/standardlibrary/mathematics/stat/mathsubfunctions/statmathsum
Yeah. Implementation ...
It's a lib, it's supposed to go like this:
1. At zero array returns value initialized by default constructor (for primitives it's 0)
2. At zero array, it crashes in runtime.
3. Returns a structure containing the result code and amount
The method is called "whatever you like")))
I wrote it by hand, so maybe I screwed up somewhere.
Cramer's theorem is in this book (Appendix, page 102).
thank you! it turns out to be very easy to prove through the (complicated) circle theorem.
Yeah. Implementation ...
It's a lib, it's supposed to go like this:
1. At zero array returns value initialized by default constructor (for primitives it's 0)
2. At zero array, it crashes in runtime.
3. Returns a structure containing the result code and amount
The method is called "whatever you like")))
I've written it by hand, so maybe I've screwed up somewhere.
Well, it was written: "we do it as in R but faster", as in C++ it was not promised.
Well, it was written "do as in R, only faster", as in C++ is not promised.
Weak excuse.
Doing as in R... I don't know, R isn't in my stack.
Except, not using templates when writing a library in C++ (if it looks like C++, smells like C++ and even has UB, that's suggestive...) - it's somehow ...
https://www.mql5.com/ru/docs/standardlibrary/mathematics/stat/mathsubfunctions/statmathsum
It's in the help, but the compiler doesn't see it.
Is it just me?
I just saw that you have
#include <Math\Stat\Math.mqh>
So it must be an external library.
Once again, I don't see the point of burdening your program with additional libraries just to save a single line of code.
Once again, I don't see the point of burdening your programme with extra libraries to save a single line of code.
The program for the special case is - is. The quibbles about MathSum are insignificant
on the background of more essential problem: above noticed that this solution works only if the centre of the circumscribed circle gets inside the figure.
That is, we need another criterion of applicability. "for this one you're welcome, but for this one I can't".
Now the topic is directly related to optimizer optimization...
the programme for the special case is there - it is there. The quibbles about MathSum are insignificant
on the background of more essential problem: above noticed that this solution works only if the centre of the circumscribed circle falls inside the figure.
That is, we need another criterion for applicability. "for this one you're welcome to get results, but for this one I can't".
Now the topic is directly related to optimizer optimization...
At first glance, only the equation for determining R will change.
1) In the case of the centre inside: A1+A2+...+An=2*Pi
2) In the case of the centre outside: A1-A2-...-An=0, where A1 is the angle for the longest side.
Hence, we only need to determine how to distinguish between the two cases.
PS. In general, you need to calculate the sum of angles Ai provided that the radius is equal to half of the maximum side. If it is less than 2*Pi, then the centre is outside the polygon and vice versa.
the programme for the special case is there - it is there. The quibbles about MathSum are insignificant
on the background of more essential problem: above noticed that this solution works only if the centre of the circumscribed circle falls inside the figure.
That is, we need another criterion for applicability. "for this one you're welcome, but for this one I can't".
Now the subject is directly related to optimizer optimization...
Why can't I do it?
You just need time to spend, but for what purpose - is not clear.
I think Simakov already did it. True, I did not understand it.
All right, I'll try it my way. To make everything visually clear.