Files
mql5-skills/skills/mql5/references/docs/08-math/0617-math-mathisvalidnumber.md
T
2026-06-23 21:47:51 +08:00

33 lines
629 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MathIsValidNumber
It checks the correctness of a real number.
```
bool  MathIsValidNumber(
   double  number      // number to check
   );
```
Parameters
number
[in]  Checked numeric value.
Return Value
It returns true, if the checked value is an acceptable real number. If the checked value is a plus or minus infinity, or "not a number" (NaN), the function returns false.
Example:
```
   double abnormal=MathArcsin(2.0);
   if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal); 
```
See also
[Real types (double, float)](/en/docs/basis/types/double)