Table Of Contents

MathScript Data Type Reference

Last Modified: December 23, 2016

MathScript supports several input data types.

Icon Data Type Details
Single-precision, floating-point numeric (single)

Minimum positive number: 1.40e-45

Maximum positive number: 3.40e+38

Minimum negative number: -1.40e-45

Maximum negative number: -3.40e+38

Double-precision, floating-point numeric (double)

Minimum positive number: 4.94e-324

Maximum positive number: 1.79e+308

Minimum negative number: -4.94e-324

Maximum negative number: -1.79e+308

Complex single-precision, floating-point numeric (single complex) Same as single-precision, floating-point, with a real and an imaginary part.
Complex double-precision, floating-point numeric (double complex) Same as double-precision, floating-point, with a real and an imaginary part.
8-bit signed integer numeric (int8)

A positive or negative integer stored using 8 bits, or a single byte.

Range: -128 to 127

16-bit signed integer numeric (int16)

A positive or negative integer stored using 16 bits, or two bytes.

Range: -32,768 to 32,767

32-bit signed integer numeric (int32)

A positive or negative integer stored using 32 bits, or four bytes.

Range: -2,147,483,648 to 2,147,483,647

64-bit signed integer numeric (int64)

A positive or negative integer stored using 64 bits, or eight bytes.

Approximate Range: -1e19 to 1e19

8-bit unsigned integer numeric (uint8)

A positive integer stored using 8 bits, or a single byte.

Range: 0 to 255

16-bit unsigned integer numeric (uint16)

A positive integer stored using 16 bits, or two bytes.

Range: 0 to 65,535

32-bit unsigned integer numeric (uint32)

A positive integer stored using 32 bits, or four bytes.

Range: 0 to 4,294,967,295

64-bit unsigned integer numeric (uint64)

A positive integer stored using 64 bits, or eight bytes.

Approximate Range: 0 to 2e19

Logical (logical) A true/false value.
Character (char) Strings are vectors of characters.
Structure (struct) Structures are data types where every field has a name and a dedicated value. Array structures are arrays in which each element is a structure. The fields of scalar structures can be any data type. The fields of structure arrays must be of the same data type over all array elements.

Additional Information

  • Arrays can contain values of any data type.
  • MathScript determines the data type of output variables at edit time. If you change the data type of an output terminal manually, MathScript coerces the value to the data type you selected. If the coercion is not possible, MathScript returns an error.

Recently Viewed Topics