|
-
November 28th, 2012, 08:21 AM
#3
Re: A class for operations with Large Integer Numbers
this class seems to solve the large number problem by implementing the storage as a string. And then doing all the operations "like you did in elementary school with a sheet of paper".
This is adequate for simple math problems or for problems where conversion to strings is happening often.
It is going to be very very slow for "complex" or lengthy math operations on really big numbers. (lets say something like finding the greatest common denominator between 2 50 digit numbers).
This may be what you need, or it may not.
Search around you will find classes based around arrays of integers (i.e. binary storage). These will be slower at converting to/from a string representation. But they will be considerably faster at actual math operations.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|