cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
arithmetics and rational numbers
arithmetics and rational numbers
Jun 4, 2010 at 3:51pm UTC
antx
(2)
Hello,
I am looking for libraries in order to compute advanced arithmetic operations (gcd...), and another one to implement rational numbers (I know it's easy but I'd like to avoid re-writing the class and operators)
Do someone know this kind of libraries ?
Thank you
Jun 4, 2010 at 4:12pm UTC
Galik
(2254)
You could try this:
http://gmplib.org/
It does rational numbers:
http://gmplib.org/manual/Rational-Number-Functions.html#Rational-Number-Functions
EDIT: C++ interface
http://gmplib.org/manual/C_002b_002b-Interface-Rationals.html#C_002b_002b-Interface-Rationals
Last edited on
Jun 4, 2010 at 4:18pm UTC
Jun 4, 2010 at 4:35pm UTC
antx
(2)
Thank you, it seems perfect !
For those who speak french and would like to install it on a MS-windows system (not sure there will be a lot but...) :
http://www.siteduzero.com/tutoriel-3-2164-gmp---arithmetic-without-limitation.html
It is a small program to compile it.
Topic archived. No new replies allowed.