isint

This page explains how to use the isint function in APL.

Use the isint function in APL to check whether a numeric value is an integer, meaning it has no fractional component. The function returns true for both positive and negative integer values and false for floating-point values, NaN, or infinity.

isint is useful for data validation and type-checking in observability queries. For example, you can use it to verify that computed fields or imported values are whole numbers before performing integer-specific operations such as array indexing or factorial-based calculations.

Usage

Syntax

isint(expression)

Parameters

NameTypeRequiredDescription
expressionrealYesThe numeric value to check.

Returns

true if the value is a positive or negative integer (no fractional part). false for non-integer real numbers, NaN, and infinity.

Example

Use isint to check whether a value is of integer type.

Query

print a = isint(42), b = isint(4.2)

Run in Playground

Output

ab
truefalse
  • isfinite: Returns true for values that are neither infinite nor NaN. Use it for a broader check covering all valid float states.
  • isinf: Returns true only for infinite values. Use it to detect overflow results specifically.
  • isnan: Returns true only for NaN values. Use it to detect undefined computation results.
  • round: Rounds a value to a given precision. Use it to produce integer-valued results before applying isint.
  • sign: Returns the sign of a value. Use it alongside isint when you need both the sign and the integer-status of a value.

Other query languages