MathIsValidNumber example in "MQL5 Reference / Math Functions / MathIsValidNumber " always is not true

 

In the example "MQL5 Reference / Math Functions / MathIsValidNumber" always wrong. The double data type is not correct and should be bool


wrong:

double abnormal=MathArcsin(2.0);
if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal);

true:

bool  abnormal=MathArcsin(2.0);
if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal);


 
alipoormomen:

In the example "MQL5 Reference / Math Functions / MathIsValidNumber" always wrong. The double data type is not correct and should be bool


wrong:

double abnormal=MathArcsin(2.0);
if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal);

true:

bool  abnormal=MathArcsin(2.0);
if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal);


In future when you post code use the   SRC   button to post code: How to use the   SRC   button. 

MathArcsin() returns a double so the variable holding it's returned value,  abnormal, should be a double . . .  not a bool 

MathIsValidNumber() takes a double as it's input not a bool . . . 


Your code is wrong. 

 
ok thanks
RaptorUK:

In future when you post code use the   SRC   button to post code: How to use the   SRC   button. 

MathArcsin() returns a double so the variable holding it's returned value,  abnormal, should be a double . . .  not a bool 

MathIsValidNumber() takes a double as it's input not a bool . . . 


Your code is wrong. 

Your statement is true. Thank you.
Reason: