473,804 Members | 3,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for a C++ Large Number Class

I have a nice public domain large number class that uses STL vectors and
seems to be relatively bug free but is not the fastest thing on the planet
and I have a need for speed. Anyone know of any available that are really
optimized for speed. All I need for functionality is multiply, divide and
modulous operations.
Jul 22 '05 #1
5 2405
"Bruce" <br***@nospam.c om> wrote...
I have a nice public domain large number class that uses STL vectors and
seems to be relatively bug free but is not the fastest thing on the planet
and I have a need for speed. Anyone know of any available that are really
optimized for speed. All I need for functionality is multiply, divide and
modulous operations.


Joining in the search for the biggest prime? Heheh... Have you tried
Google? Do try it, it's fun and it's full of good information...
Jul 22 '05 #2
Bruce wrote:
I have a nice public domain large number class that uses STL vectors and
seems to be relatively bug free but is not the fastest thing on the planet
and I have a need for speed. Anyone know of any available that are really
optimized for speed. All I need for functionality is multiply, divide and
modulous operations.


Try GMP.

BTW - this is off topic here. You'd be better off trying a NG that
suits your question better. Nothing comes to mind but one of the crypto
groups might be a good place to start.

Jul 22 '05 #3
Gianni Mariani wrote:
Bruce wrote:
I have a nice public domain large number class that uses STL vectors and
seems to be relatively bug free but is not the fastest thing on the
planet
and I have a need for speed. Anyone know of any available that are
really
optimized for speed. All I need for functionality is multiply, divide
and
modulous operations.

Try GMP.

BTW - this is off topic here. You'd be better off trying a NG that
suits your question better. Nothing comes to mind but one of the crypto
groups might be a good place to start.


I've used GMP with great success in a ~20,000 line C++ program. It
comes with C++ class wrappers around C functions. I wrapped the GMP C
functions myself, because I needed to provide some low-level operators:
reduction operators, bitwise operators, etc.

Jul 22 '05 #4
In comp.lang.c++
"Victor Bazarov" <v.********@com Acast.net> wrote:
"Bruce" <br***@nospam.c om> wrote...
I have a nice public domain large number class that uses STL vectors and
seems to be relatively bug free but is not the fastest thing on the planet
and I have a need for speed. Anyone know of any available that are really
optimized for speed. All I need for functionality is multiply, divide and
modulous operations.


Joining in the search for the biggest prime? Heheh... Have you tried
Google? Do try it, it's fun and it's full of good information...


Actually, google is good for large volumes of data. I was looking for a
FAST library that some real programmers could attest to. I found MIRACL
and have begun integrating that one.

No, I'm not looking for the biggest prime, only two particular ones.
Jul 22 '05 #5
"Bruce" <br***@nospam.c om> wrote:
I have a nice public domain large number class that uses STL
vectors and seems to be relatively bug free but is not the
fastest thing on the planet and I have a need for speed.
Anyone know of any available that are really optimized for
speed. All I need for functionality is multiply, divide and
modulous operations.


Check out http://www.oonumerics.org/oon/

Go down to the "Multiprecision , arbitrary precision data types"
section. There are a few libraries to choose from. One of them might
be what you are looking for.
Jul 22 '05 #6

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

Similar topics

36
6414
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
1
2917
by: DJTB | last post by:
zodb-dev@zope.org] Hi, I'm having problems storing large amounts of objects in a ZODB. After committing changes to the database, elements are not cleared from memory. Since the number of objects I'd like to store in the ZODB is too large to fit in RAM, my program gets killed with signal 11 or signal 9... Below a minimal working (or actually: it doesn't work because of memory
2
2970
by: assi | last post by:
Hello all We are developing a large dotnet application, which includes ~ 120 assemblies. (total size of all binaries is ~ 20MB). Our application also references the following dotnet assemblies: System,System.XML, System.Windows.Forms, System.Drawing, System.Data, System.Design. We use dotnet framework 1.1 During initialization, the application scans a directory and loads the assemblies (using Assembly.LoadFrom). It then scans all...
7
3542
by: Joseph | last post by:
Hi, I'm having bit of questions on recursive pointer. I have following code that supports upto 8K files but when i do a file like 12K i get a segment fault. I Know it is in this line of code. How do i make the last pointer in the indirect sector that has another level of indirect pointer, and be defined recursively to support infinite large files? -code-
1
2829
by: akickdoe22 | last post by:
Please help me finish this program. i have completed the addition and the subtraction parts, but i am stuck on the multiplication and division. any suggestions, hints, code, anyhting. it's not a true large int calculator, the numbers entered are at max 100 intergers. CODE SO FAR: #include<iostream> //libraries limited to #include<string> using namespace std;
1
1689
by: juli jul | last post by:
Hello, Could someone plz tell me how to implement(!) finding the number occurrences small matrix inside a bigger one. (They are static - with fixed size : for example 3*3 inside 6*6) Thank you very much! *** Sent via Developersdex http://www.developersdex.com ***
4
2049
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
When one architects a new project one of the first steps in the decision is to decide on the layers. (In my opinion anyway) One architecture that I have used before is to go solid OO and create objects, which normally are very small and only deals with the stuff pertaining to that object, then break it down into Business Process, Process Controllers and Data Access Objects for each "Object", each of which is created in it's very own .Net...
2
8347
by: A.E lover | last post by:
Hi all, I am working on a project for industry and looking for free reliable C code for Singular Value Decomposition (SVD). I have the C code based from the book "Numerical recipes in C", but as I remember, few years ago, I also used this for SVD but the obtained results were not good. Then I changed to use SVD function in OpenCV libs and the results were much better. However I don't want to inlcude OPENCV into my current program this...
4
1931
by: bcomeara | last post by:
I am writing a program which needs to include a large amount of data. Basically, the data are p values for different possible outcomes from trials with different number of observations (the p values are necessarily based on slow simulations rather than on a standard function, so I estimated them once and want the program to include this information). Currently, I have this stored as a vector of vectors of varying sizes (first vector is...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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...
0
9161
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
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.