Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6719637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:06:59+00:00 2026-05-26T09:06:59+00:00

I’m thinking about different ways to implement arbitrary-precision arithmetic (sometimes called Bignum, Integer or

  • 0

I’m thinking about different ways to implement arbitrary-precision arithmetic (sometimes called Bignum, Integer or BigInt).

It seems like the common idiom is to use an array for the storage of the actual value and reallocate it as needed if space requirements grow or shrink.

More precisely, it seems that the bit size of the array elements is often the second largest size commonly supported (to make calculations with overflow easier to implement probably?), e. g. language/platform supports 128bit-sized numbers -> array of 64bit numbers + 128bit variable to handle overflow.

Are there fundamentally different ways to implement arbitrary-precision arithmetic or is the above the “tried and true” way to implement it without huge performance losses?

My question is about the underlying data structure, not the algorithms for operations. I know Karatsuba, Toom-Cook et alii.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:07:00+00:00Added an answer on May 26, 2026 at 9:07 am

    It is possible to use the Chinese Remainder Theorem to represent large integers in a fundamentally different way from the usual base-2^n system.

    I believe a CRT-based representation will still use an array of elements which, like the conventional representation, are based on the most convenient native arithmetic available. However, these elements hold the remainders of the number when divided by a sequence of primes, not base-2^n digits.

    As with the conventional representation, the number of elements used determines the maximum size of the representable number. Unfortunately, it is not easy to compute whether one CRT-based number is greater than another, so it is hard to tell if your representation has overflowed the maximum size. Note that addition and multiplication are very fast in CRT representation, which could be an advantage if you can deal with the overflow issue.

    However, to answer your question: I believe it is accurate to say that the base-2^n system is indeed the “tried and true” representation, which is used by most popular bignum libraries. I think I recall that there are extant CRT-based bignum libraries, although I have not checked lately to see if they are still around….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.