Welcome to the FORTRAN Version of Adams/Solver > Adams/Solver (FORTRAN) Functions > ANINT

www.kxcad.net Home > CAE Index > MSC Software Index > Adams MD R2 Index


Your Ad Here

ANINT
The ANINT function calculates the nearest integer to a.
ANINT(a) = int(a + .5) if a > 0
ANINT(a) = int(a - .5) if a < 0
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
ANINT(a)
Arguments
 
Any valid function expression.

Number of arguments: 1
Examples
ANINT(-4.6) = -5
ANINT(4.6) = 5
 
Your Ad Here