
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
It turns out that #import ex5 is the evil of optimization.
In terms of being able to optimise globally, yes.
We have quite aggressive inlining without trying to make the code smaller. So in global optimization mode we generate very good code.
This can be seen in the compile time, where we put the resulting speed at the top of the list.
fxsaber
There is an error in your code
Thank you, corrected.
Still a mistake.
It should be a 5 at the end.
Still an error
This is not an error, it is rounding. That's how the standard version does it.
Here's the code for you to test
Here's your code, test it.
Val2 - correct. Val3 after conversion to long - not correct. Apparently, it is some peculiarity of double representation of floating point numbers. We need to increment EPSILON. I can't make it out on my sleepy head. Maybe some knowledgeable people may give me a hint.
I need to figure out what considerations the developers used to write this
This seems to be where the dog is buried.
This seems to be where the dog is buried.
The roots grow from the RSDN forum
Of course, there are cases where the range of numbers is more or less known and predictable. Say, 0...1000. In this case, you can take a constant like 1000*16*DBL_EPSILON for a rough comparison. But we must keep in mind that such a comparison actually turns the whole floating point idea into a fixed point (guess why).
A variant of CopyTicks, which is sometimes several orders of magnitude faster than the original (from > 0)