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

629 B

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)