HyperWorks Solvers

ANINT

ANINT

Previous topic Next topic No expanding text in this topic  

ANINT

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Format

ANINT(x)

Description

Returns the nearest integer to x:

ANINT(x) = floor(val) if val is greater than or equal to zero

AINT(x) = ceil(val) if val is less than zero ; where

val = x + 0.5 if x is greater than or equal to zero

val = x – 0.5 if x is less than zero

Example

<Reference_Variable

    id                  = "1"

    label               = "ANINT Example"

    type                = "EXPRESSION"

    expr                = "ANINT(AY(569,193))"

/>

ANINT(-1.2) = -1

AINT(5.8) = 6

AINT(0.8) = 1

Arguments

x

Any valid function expression.

Comments

The mathematical function floor(x)calculates the largest integer not greater than x. ceil(x)calculates the smallest integer not less than x.

See Also:

Functions

Command Statements

Model Statements

Notation and Syntax