integer - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MTM[int8], MTM[int16], MTM[int32], MTM[int64]

convert to integer

MTM[uint8], MTM[uint16], MTM[uint32], MTM[uint64]

convert to unsigned integer

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

int8(A)

int16(A)

int32(A)

int64(A)

uint8(A)

uint16(A)

uint32(A)

uint64(A)

Parameters

A

-

an expression, or an array, matrix, or vector of expressions

Description

• 

The int32(A) functions evaluate each element of A numerically and round the result to the nearest integer value that fits in the specified number of bits.  

• 

The range of int8 is -2^7 .. 2^7-1 or -128 .. 127

• 

The range of int16 is -2^15 .. 2^15-1 or -32768 .. 32767

• 

The range of int32 is -2^31 .. 2^31-1 or -2147483648 .. 2147483647

• 

The range of int64 is -2^63 .. 2^63-1 or -9223372036854775808 ..  9223372036854775807

• 

The range of uint8 is 0 .. 2^8-1 or 0 .. 255

• 

The range of uint16 is 0 .. 2^16-1 or 0 .. 65535

• 

The range of uint32 is 0 .. 2^32-1 or 0 .. 4294967295

• 

The range of uint64 is 0 .. 2^64-1 or 0 .. 18446744073709551615

• 

A value under the minimum range is increased to the minimum. A value over the maximum range is reduced to the maximum.

• 

If possible, the computation is done using the floating-point hardware of the underlying system using evalhf.

• 

Division by zero will be trapped and the maximum integer value for the specified precision is returned instead of raising an error.

Examples

withMTM:

int32π

3

(1)

AArray,,3.2:

int32A

−214748364821474836473

(2)

uint16A

0655353

(3)

See Also

evalhf

MTM[double]

MTM[integer]