AINT

The AINT(a) function returns the closest integer less than or equal to the magnitude of the value of the expression a, as long as the value of the expression a is a positive integer. Otherwise, AINT returns zero.

AINT(a) = 0 if ABS(a)< 1

AINT(a) = int(a) if ABS(a) ≥ 1

The value of the mathematical function int of a variable x is equal to x if x is an integer. If x is not an integer, then int(x) is equal to the nearest integer to x whose magnitude is not greater than the magnitude of x. Thus int(-7.0) = -7, int(-4.8) = -4, and int(4.8) = 4.

Format

AINT(a)

Arguments

a Any valid function expression.
  Number of Arguments: 1

Cautions

AINT is not a differentiable function. Be careful when using this function in an expression that defines a force or motion input to the system.

Examples

AINT(-6.5) = 0

AINT(4.6) = 4