"UnsignedInteger32" (Compiled Type)

"UnsignedInteger32"

represents an unsigned 32-bit machine integer atomic type specifier.

Details

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

Properties

  • Values held by "UnsignedInteger32" range from 0 to 232-1.

Conversions

    From Expressions

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

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

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

Runtime Errors

    Overflow

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

Examples

Basic Examples  (3)

"UnsignedInteger32" 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 "UnsignedInteger32" argument is automatically promoted when combined with a real number:

When an "UnsignedInteger32" argument is combined with an integer of a smaller storage size, the smaller type is automatically promoted:

The "UnsignedInteger32" 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 "UnsignedInteger32":