AINT

The AINT function returns the nearest integer whose magnitude is not larger than the integer value of the expression a.
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
 
Caution:  
Note that 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) = -6
AINT(4.6 ) = 4
See other FORTRAN 77 intrinsic functions available.