473,976 Members | 6,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unlimited-precision integer library


Hello all,

Can anybody recommend a freely-available library that provides
unlimited-precision integers? All of the standard arithmetic operations
would need to be supported as well as construction from a std::string and
representation as a std::string. For example, something along these lines:

unlimited_int
foo("6823462683 497834734297823 497843296723484 385723458234623 498243798423789 4
237982349824398 42398");
cout << foo + 1 << endl;

Thanks in advance!
Dave

P.S. I believe such a library is under development in Boost, but is not yet
available. My desire would be to use this with the rational number library
from Boost, and then in turn use that with a matrix manipulation library to
do unlimited-precision matrix operations. Taking inverses, doing Gaussian
elimination, etc... can result in some mighty ugly rationals...
Jul 19 '05 #1
2 2888
"Dave Theese" <ch**********@y ahoo.com> writes:
Hello all,

Can anybody recommend a freely-available library that provides
unlimited-precision integers? All of the standard arithmetic operations
would need to be supported as well as construction from a std::string and
representation as a std::string. For example, something along these lines:

unlimited_int
foo("6823462683 497834734297823 497843296723484 385723458234623 498243798423789 4
237982349824398 42398");
cout << foo + 1 << endl;


Have you checked the Available C++ Libraries FAQ? It's posted here regularly.
Also, you might want to check out GMP (http://www.swox.com/gmp/).

HTH & kind regards
frank

--
Frank Schmitt
4SC AG phone: +49 89 700763-0
e-mail: frank DOT schmitt AT 4sc DOT com
Jul 19 '05 #2

"Frank Schmitt" <fr***********@ 4sc.com> wrote in message
news:4c******** ****@scxw21.4sc ...
"Dave Theese" <ch**********@y ahoo.com> writes:
Hello all,

Can anybody recommend a freely-available library that provides
unlimited-precision integers? All of the standard arithmetic operations
would need to be supported as well as construction from a std::string and representation as a std::string. For example, something along these lines:
unlimited_int
foo("6823462683 497834734297823 497843296723484 385723458234623 498243798423789 4 237982349824398 42398");
cout << foo + 1 << endl;
Have you checked the Available C++ Libraries FAQ? It's posted here

regularly. Also, you might want to check out GMP (http://www.swox.com/gmp/).

HTH & kind regards
frank


NTL is another possibility. http://www.shoup.net/ntl/

john
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1998
by: Gary Smart | last post by:
Hello. I've been searching news groups and apache and google, but can't solve this one: I have an XML file used to create menu items in a Swing UI. I have a <menu> element that can have an unlimited number of other <menu> elements. So for a menu structure like Tools|Options|Email, the XML would be similar to:
2
1981
by: Debbie Davis | last post by:
Greetings, I have a page displaying records in a table across but there are too many records to display and they run off the page, SO I thought I could show five columns with an unlimited number of rows. I'm stuck though. I've never done that before. I don't know where to start. Any thoughts would be very helpful. I don't need paging as I can display all records on one page, keeping it simple.
5
3393
by: Travis Pupkin | last post by:
Hey, I've done a number of product catalogs/galleries with one or two category levels (Category > Subcategory). The straightforward way to do this, of course, is to use database fields for Category and Subcategory and query off of those fields. I have a client now who is interested in what sounds to me to be an unnecessarily complex catalog with an as of yet undefined number of category levels at their disposal.
47
2735
by: Jeff Relf | last post by:
Hi All, I plan on using the following C++ code to create nodes with unlimited children: // I would like to declare NodeT like this, // but it won't compile because Lnk_T is not defined yet. struct NodeT { Lnk_T Lnk ; };
3
7208
by: Joe | last post by:
I want to create a method similar to Console.WriteLine where I can pass in an unlimited parameter list. I know how to do this in C++ but have no clue in C#. Thanks for any help, Joe
2
2223
by: tagnum | last post by:
I have written a program for unlimited categories depth, which is in use for few ecommerce websites. Like many others, I used one SQL table to store the category relation (or the tree structure). E.g. child_id & parent_id. To cope with the "unlimited" nature, the htaccess file & html ul list are generated on the fly. To sum it up, it has SEO friendly URLs, breadcrumbs, CSS driven navigation bar, category ordering in the backend, etc. But I...
1
1723
by: ashishmundhara108 | last post by:
Is your website getting very less no. of visitors .If so, then post your website to http://goodtolove.com to get unlimited visitors for lifetime...No need to pay a penny.
1
1232
by: Unlimited Free Domain & Web Hosting | last post by:
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space , you can upload file for unlimited . 3) Unlimited Email , many of email account can created . 5) SSL Security , used SSL / HTTPS to protect your web . 6) LINUX , WINDOWS and MAC , can access form many operating system.
0
1129
by: santhoshkumar547 | last post by:
Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download...
7
22988
crystal2005
by: crystal2005 | last post by:
Hi everyone, I gonna ask how to set unlimited size of array of characters. According to the tutorial that i have found after amount of time of googling, array size should be defined when we declare it. In my task requirement, i'm gonna need 2D array to store the value of characters. E.g. char inputText; //20 characters is the maximum for each line In my case, i will put the user into an unlimited input of characters until certain...
0
10355
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11408
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11573
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10908
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10084
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.