INT64 arithmetic in MATLAB

Enables int64 Addition, subtraction, multiplication, division and modulus.


Updated 5 Nov 2010

View License

This submission enables the following operations for the int64 and uint64 data types:
* Addition
* Subtraction
* Multiplication (element-wise and matrix)
* Division (element-wise only)
* mod, abs, bitshift

See the published file for more details.

Cite As

Petter (2023). INT64 arithmetic in MATLAB (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Version Published Release Notes

Removed the compiled *.mexw32 and *.mexw64

Added colon operator for 1:n constructs

Updating according to comments by Jan Simon. Thanks!
Nothing changes for the user except the behaviour of mod(i,0)

Added matrix multiplication (not fast compared to double)

*Added support for the uint64 datatype as well
*No longer accepts A*B is A and B are matrices
*Added binaries for Windows 64-bit

Description update

Added support for the bitshift function

Update according to suggestions from Bruno Luong: Out out memory check and requiring that the dimensions of the arrays matches exactly (not just number of elements).