Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
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
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
See Also
evalhf, MTM[double], MTM[integer]
Download Help Document