Floating point type bug in 64bit version New comment Mariusz Woloszyn 2010.10.11 20:34 Hi!I have experienced strange problem in 64bit version of MT5 when the function is imported from the external library.I have created a sample function in C:double __stdcall test_double(double d){ return (d*1.22);}and declared it in MQL:double test_double(double d);When invoked in MQL like that:Print ("test_double:"+test_double(100));I got:2010.10.11 18:12:42 double_bug (EURUSD,H1) test_double:-1.#INDThe very same code works like a charm when recompiled for an run under 32 bit MT5 platform.It's very strange as double and float data types are standard across all platforms and do not depend on the architecture.Later I redefined the routine to: double __stdcall test_double(double d) { return (1.22); } And got the very same result.Looks like a terminal bug. Handling of WinAPI strings in MQL5 with MQL Standard Library Error in a simple "Print" Bug with MQL libraries Test Account 2010.10.12 10:36 #1 Thanks for message.We'll check it. Ilyas 2010.10.12 11:08 #2 Thank you for your message. Bug fixed. Please wait for updates. Mariusz Woloszyn 2010.10.12 11:27 #3 Thank you for your quick reaction :)Any hint when I can expect new build? Mariusz Woloszyn 2010.10.18 12:21 #4 Hi!I just got the new build (344 of Ocrober 15th) yet the problem still persists. Ilyas 2010.10.18 12:34 #5 To solve this problem, your mq5 file must be recompiled Mariusz Woloszyn 2010.10.18 13:50 #6 Confirmed, it works once recompiled.Thank you :) New comment
Hi!
I have experienced strange problem in 64bit version of MT5 when the function is imported from the external library.
I have created a sample function in C:
double __stdcall test_double(double d)
{
return (d*1.22);
}
and declared it in MQL:
double test_double(double d);
When invoked in MQL like that:
Print ("test_double:"+test_double(100));
I got:
2010.10.11 18:12:42 double_bug (EURUSD,H1) test_double:-1.#IND
The very same code works like a charm when recompiled for an run under 32 bit MT5 platform.
It's very strange as double and float data types are standard across all platforms and do not depend on the architecture.
Later I redefined the routine to:
double __stdcall test_double(double d)
{
return (1.22);
}
And got the very same result.
Looks like a terminal bug.