Floor returns a double. So Print(MathFloor(11219.0) is the same Print(MathFloor(11219.xxxx) is the same as Print(11219.0000). Print(MathFloor(10000*1.12190)) is the same as Print(MathFloor(11219.xxxxx)) is the same as Print(11219.000).
What you have is a double 11218.999999 which prints as 11219.0. but floor(11218.999999*10000) is floor(11218.9999) which is 11218.0000. It's your not understanding floating point and that some numbers can't be represented exactly. (like 1/10.) Double-precision floating-point format - Wikipedia, the free encyclopedia
Thanks for clarification

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 am getting a confusing issue with MathFloor() function in mql4.
Print(MathFloor(11219.0)) gets displayed as 11219.0
but
Print(MathFloor(10000*1.12190)) gets displayed as 11218.0?
Any idea, why?