CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Nov 2005
    Location
    Bucharest / Romania
    Posts
    5

    Operation with long_numbers

    OK, I couldn't find anything about this topic, so it's either that i'm not looking where I should, or i'm not looking for what i should. If there is such a topic on this forum, then the search tool sux .

    Long doesn't stand for the numeric type LONG <aka 0-2^16-1>, but really long <aka many digits> numbers, which wouldn't fit in any numeric type. So these numbers are stored as arrays (1 dim: e.g. 1024 is stored in num: num[1]=1, num[2]=0, num[3]=2, num[4]=4).

    My question is: does anyone have any idea about mathematical algorithms to use with such numbers?? (where to find info about that, or even already made)

    Addition is easy: just add array elements and watch out for carry...
    What about multiplication, or even more complex operations??

    PS: yep, search tool not that reliable... found something on the 9th page of results...
    Last edited by draqula; November 22nd, 2005 at 10:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured