image thumbnail

Big Integer Arithmetic

version (415 KB) by Michael Chan
Demonstrate big integer arithmetic, such as multiplication, addition, subtraction, etc.


Updated 11 Aug 2014

View License

The objective is to demonstrate big integer arithmetic, such as multiplication, addition, subtraction, etc. Other utilities includes comparison of values and printing big integer values (given as integer array) as string.
main executing reference usages: usage_bigIntegerOperations.m
Sample run:

3356846207105439564587992911895976292762589455707316583464831725207842 x 9794055690126173992377489963508068741579673734383766360427036604610424 = 32877138695579495485251882311435695545653783760411939807396746956744701303101530714509467933518447434648520155083949079304274482876839745008


3356846207105439564587992911895976292762589455707316583464831725207842 + 9794055690126173992377489963508068741579673734383766360427036604610424 = 13150901897231613556965482875404045034342263190091082943891868329818266


3356846207105439564587992911895976292762589455707316583464831725207842 - 9794055690126173992377489963508068741579673734383766360427036604610424 = -6437209483020734427789497051612092448817084278676449776962204879402582

* Caveat:
1. For reference only.

If the illustrative demo has more elegant presentation, please do not hesitate to suggest and send feedback to the author.

Thank you.

Michael Chan JT

Cite As

Michael Chan (2021). Big Integer Arithmetic (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!