isinf function in APL to check whether a numeric value is positive or negative infinity. The function returns true only when the value is ±∞ and false for all finite values and NaN.
isinf is useful for detecting overflow conditions or division-by-zero results in computed columns. Unlike isfinite, which also catches NaN values, isinf specifically targets infinite results, allowing you to distinguish overflow from undefined computations.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
Splunk SPL doesn’t have a direct
isinf() function. You typically check whether a value equals a specific infinity representation, which isn’t directly available in most SPL expressions.ANSI SQL users
ANSI SQL users
Standard SQL does not define an
ISINF() function. Most SQL databases raise an error on division by zero rather than producing infinity, so there is no direct equivalent.Usage
Syntax
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x | real | Yes | The numeric value to check. |
Returns
true if x is positive or negative infinity. false for finite values and NaN.
List of related functions
- isfinite: Returns
truefor values that are neither infinite nor NaN. Use it for a broader check covering all invalid float states. - isnan: Returns
trueonly for NaN values. Use it alongsideisinfto detect the other class of invalid float. - isint: Returns
truefor integer values. Use it when you need to validate that a value is a whole number. - not: Reverses a boolean value. Use
not(isinf(x))as a shorthand forisfinite(x)when NaN values are not a concern. - log: Returns the natural logarithm. Compute
logon potentially zero or negative values and useisinfto detect the resulting-inf.