"UnsignedInteger16" (Compiled Type)
"UnsignedInteger16"
represents an unsigned 16-bit machine integer atomic type specifier.
Details
- "UnsignedInteger16" can be used in Typed and related constructs to specify a type.
Conversions
- Suitably sized Integer expressions can be converted into compiled code elements with the type "UnsignedInteger16".
- "UnsignedInteger16" compiled elements can be converted into Integer expressions.
- "UnsignedInteger16" compiled elements are automatically promoted to real or complex elements when they are combined in binary arithmetic operations.
- Compiled elements with types smaller than "UnsignedInteger16" are automatically promoted to "UnsignedInteger16" when they are combined in binary arithmetic operations.
- "UnsignedInteger16" 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.
From Expressions
To Expressions
Arithmetic
Examples
Basic Examples (3)
"UnsignedInteger16" can be used as an input and output from a CompiledCodeFunction:
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:
The "UnsignedInteger16" argument is automatically promoted when combined with a real number:
When an "UnsignedInteger16" argument is combined with an integer of a smaller storage size, the smaller type is automatically promoted:
The "UnsignedInteger16" argument is automatically promoted when combined with an integer of a larger storage size:
The signed integer of the same storage size is automatically promoted when combined with an "UnsignedInteger16":