Latest MT4 update 1421 has a very SERIOUS BUG!!! - page 5

 

Guys who can reproduce the incorrect work of MathRound, please run this advisor and show the result.

I want to add a MathRound check to my EAs and I want to make sure that my function returns false if MathRound doesn't work correctly. I'm just not sure I was able to avoid compiler optimizations.

(The code is cross-platform)

#property strict

int OnInit()
  {
   if(!checkMathRound())
      return(INIT_FAILED);
   Alert("Initialization successful");
   return(INIT_SUCCEEDED);
  }

void OnTick() { ExpertRemove(); }

bool checkMathRound()
  {
   MathSrand(GetTickCount());
   double x = (MathRand() % 4) / 10.0 + 1.1;
   double rounded = MathRound(x);
   if(rounded == 1.0)
      return(true);
   Alert(StringFormat("MathRound doesn't work correctly. MathRound(%f) = %f", x, rounded));
   return(false);
  }
[Edited to combine 2 posts into one]
 
Vladislav Boyko #:

Guys who can reproduce the incorrect work of MathRound, please run this advisor and show the result.

I want to add a MathRound check to my EAs and I want to make sure that my function returns false if MathRound doesn't work correctly. I'm just not sure I was able to avoid compiler optimizations.

(The code is cross-platform)

You are off-topic.
 
Alain Verleyen #:
You are off-topic.

I'm talking about the MathRound bug, which is the subject of this thread.

At the moment, the only way to avoid this bug is to not run the advisor/indicator on computers where it occurs. That's what I'm trying to do, but I can't reproduce the bug on my end.

But you can delete my posts if you want.

 
Alain Verleyen #:

That's absolutely not right. While I agree it's still perfectible, they care about the developers community in general, inside their own agenda and priorities.

What they probably don't care is about you and your needs, you have no right to talk in name of the community of MQL developers.

Additionally, MT4 is done, they announced there will be no development or bug fixes years ago. Only critical bugs and security issues.

So they should fix MathRound and MathFloor, because it works ok in stable version MT4 build 1420. Everyone who installs the MT4 platform from any broker will get the latest version and it is a beta version with lots of errors. Why doesn't the stable version install? 

 

We found a bug in the CRT function floor, when it fallback execution from SSE4.1 to SSE2 and CRT is linked as static library (/MT)

CRT function floor doesn't work properly if your CPU doesn't support SSE4.1

 
For people information, CRT is C Run Time library from Windows.