aribitrary length arithmetic

J

Jeremy Watts

Hi,

I'm a C++ newbie and wondered whether C or C++ have an 'arbitrary length'
arithmetic facility, similar to say JAVA's 'BigInteger', that will carry out
arithmetic operations symbolically on integers or decimals of any length.

I am currently developing maths programs in PHP, and PHP has a 'large
number' type facility, but have been considering a switch to C++ as its
faster.


Thanks
Jeremy Watts
 
K

Karl Heinz Buchegger

Jeremy said:
Hi,

I'm a C++ newbie and wondered whether C or C++ have an 'arbitrary length'
arithmetic facility, similar to say JAVA's 'BigInteger', that will carry out
arithmetic operations symbolically on integers or decimals of any length.

I am currently developing maths programs in PHP, and PHP has a 'large
number' type facility, but have been considering a switch to C++ as its
faster.

Just search the web for 'Big Integer' or 'Big Number' Libraries.
There are plenty available.

Compared to Java (can't talk about PHP) the standard facilities of
C++ are 'poor'. C++ has only the bare minimum for safe programming.
Everything else is non standard.
 
O

Old Wolf

Karl said:
Just search the web for 'Big Integer' or 'Big Number' Libraries.
There are plenty available.

Compared to Java (can't talk about PHP) the standard facilities of
C++ are 'poor'. C++ has only the bare minimum for safe programming.
Everything else is non standard.

It's not clear to me why nobody has written a large class
library for C++, so that 'out of the box' it will have as much
functionality as PHP or Java.

Such a library would mean you could pick up your C++ compiler
and write a web site just as easily as you can in PHP now,
for example.

Of course, such a library would be bloaty, but that is a
less important concern than speedy development time, for
many people (as evinced by the popularity of PHP).


PS. I have a question about Google groups formatting, since
I read and write via it I can't answer this question myself:
does it re-word-wrap the text I have quoted above? Or does
it look like long lines interspersed with one-word lines where
the last word has been wrapped around due to increased quote
indent?
 
M

Michael Etscheid

Jeremy Watts schrieb:
[something about big integers]

Why do you ask that twice? In comp.lang.c++.moderated (message ID:
<[email protected]>) you have already been answered.
 
M

Michael Etscheid

Old said:
It's not clear to me why nobody has written a large class
library for C++, so that 'out of the box' it will have as much
functionality as PHP or Java.

Such a library would mean you could pick up your C++ compiler
and write a web site just as easily as you can in PHP now,
for example.

I don't think so. There are other and more important dependencies.
PS. I have a question about Google groups formatting, since
I read and write via it I can't answer this question myself:
does it re-word-wrap the text I have quoted above? Or does
it look like long lines interspersed with one-word lines where
the last word has been wrapped around due to increased quote
indent?

The second one.
 
J

Jerry Coffin

Old Wolf wrote:

[ ... ]
It's not clear to me why nobody has written a large class
library for C++, so that 'out of the box' it will have as much
functionality as PHP or Java.

Presumably you mean something substantially different from boost and/or
C++ TR1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,055
Members
47,658
Latest member
jaguar32

Latest Threads

Top