Function MapVal(x)

MapVal

MapVal(
      x             ! (input) numerical expression
      )

Arguments

x

A scalar numerical expression.

Return Value

The function MapVal returns the (integer) mapping value of any real or special number x, according to the following table.

Value x

Description

MapVal value

number

any valid real number

0

UNDF

undefined (result of an arithmetic error)

4

NA

not available

5

INF

\(+\infty\)

6

-INF

\(-\infty\)

7

ZERO

numerically indistinguishable from zero, but has the logical value of one.

8

Example

_p_val := inf ;
_p_return := mapval(_p_val); ! mapval(inf) returns 6.

See also

Special numbers in AIMMS and the MapVal function are discussed in full detail in Real Values and Arithmetic Extensions of the Language Reference.