# "Integer16"(Compiled Type)

"Integer16"

represents a 16-bit machine integer atomic type specifier.

# Details

• "Integer16" can be used in Typed and related constructs to specify a type.

# Properties

• Values held by "Integer8" range from -215-1 to 215-1.

# Conversions

### From Expressions

• Suitably sized Integer expressions can be converted into compiled code elements with the type "Integer16".
• ### To Expressions

• "Integer16" compiled elements can be converted into Integer expressions.
• ### Arithmetic

• "Integer16" compiled elements are automatically promoted to real or complex elements when they are combined in binary arithmetic operations.
• Compiled elements with types smaller than "Integer16" are automatically promoted to "Integer16" when they are combined in binary arithmetic operations.
• "Integer16" compiled elements are automatically promoted to larger integral elements when they are combined in binary arithmetic operations.
• "Integer16" compiled elements are automatically promoted to "UnsignedInteger16" elements when they are combined in binary arithmetic operations.

# Run-Time Errors

### Overflow

• "Integer16" can give a runtime error if it is used in an operation that overflows.

# Examples

## Basic Examples(3)

"Integer16" can be used as an input and output from a CompiledCodeFunction:

 In:= Out= In:= Out= An overflow causes an error while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:

 In:=  Out= The "Integer16" argument is automatically promoted when combined with a real number:

 In:= Out= When an "Integer16" argument is combined with an integer of a smaller storage size, the smaller type is automatically promoted:

 In:= Out= The "Integer16" argument is automatically promoted when combined with an integer of a larger storage size:

 In:= Out= The "Integer16" argument is automatically promoted when combined with an unsigned integer of the same storage size:

 In:= Out= 