Predicate function - Number
The number functions are used for validating numeric values, ranges, comparisons, and mathematical properties.
-
All functions support automatic type coercion where applicable.
-
String inputs may contain culture‑specific numeric formats, including:
- Thousand separators (,, ., or space)
- Decimal separators (. or ,)
- Currency symbols ($, €, £, ¥, ₹, …)
- Percentage symbol (%)
- Accounting negatives ((123.45))
-
Invalid parsing always results in false, unless explicitly noted.
|
Function |
Description |
Example |
|---|---|---|
| IsNumber(value) | Returns true if the value can be parsed into a finite number. |
|
| IsNotNumber(value) | Returns true if the value cannot be parsed as a finite number. |
|
| IsNaN(value) | Returns true if the value is Not-a-Number (NaN) or cannot be parsed into a number. |
|
| IsFinite(value) | Returns true if the value is a finite number (not NaN, Infinity, or -Infinity). |
|
| IsInfinite(value) | Returns true if the value is Infinity or -Infinity. |
|
| IsInteger(value) | Returns true if the value is an integer (whole number without decimals). |
|
| IsDecimal(value) | Returns true if the value is a decimal number. |
|
| IsFloat(value) | Returns true if the value is a floating-point number. |
|
| IsDouble(value) | Returns true if the value is a valid double-precision floating-point number. |
|
| IsShort(value) | Returns true if the value is a 16-bit integer (-32,768 to 32,767). |
|
| IsLong(value) | Returns true if the value is a long integer (64-bit signed integer: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807). |
|
| IsByte(value) | Returns true if the value is a byte (unsigned 8-bit integer: 0 to 255). |
|
| IsWholeNumber(value) | Returns true if the value is a whole number (non-negative integer: 0, 1, 2, 3, ...). |
|
| IsCurrency(value) | Returns true if the value is a valid currency amount (numeric value with 0-4 decimal places). |
|
| IsPercentage(value) | Returns true if the value is numeric and may optionally include a % symbol. |
|
| IsPositive(value) | Returns true if the number is positive (greater than zero). |
|
| IsNegative(value) | Returns true if the number is negative (less than zero). |
|
| IsZero(value) | Returns true if the number equals zero. |
|
| IsGreaterThanZero(value) | Returns true if the number is greater than zero (positive). |
|
| IsOdd(value) | Returns true if the number is an odd integer (not divisible by 2). |
|
| IsEven(value) | Returns true if the number is an even integer (divisible by 2). |
|
| IsPrime(value) | Returns true if the number is a prime number (integer greater than 1 divisible only by 1 and itself). |
|
| IsDivisibleBy(number, divisor) | Returns true if the number is divisible by the divisor (remainder is zero). |
|
| IsGreaterThan(number, threshold) | Returns true if the first number is greater than the threshold. |
|
| IsLessThan(number, threshold) | Returns true if the first number is less than the threshold. |
|
| IsGreaterThanOrEqual(number, threshold) | Returns true if the one number is greater than or equal to the threshold. |
|
| IsLessThanOrEqual(number, threshold) | Returns true if the one number is less than or equal to the threshold. |
|
| IsBetween(number, min, max) | Returns true if the number is between the minimum and the maximum value (inclusive by default). |
|