How To

Write here if you have problems with your C source code

Moderator: Board moderators

Post Reply
Rajib Mazumder
New poster
Posts: 14
Joined: Fri Jul 05, 2002 7:04 pm
Location: Bangladesh
Contact:

How To

Post by Rajib Mazumder »

Hey All
What are the most efficient ways of taking
1. int to string
2. string to int
3. string addtion
4. string multiplication

suman
New poster
Posts: 45
Joined: Fri Oct 19, 2001 2:00 am
Contact:

Try algorithm thread

Post by suman »

Hi,
Why don't you try the algorithm thread and see the post on BigInteger. I think this may help you. If you want to implement one of your own, see D.E.Knuth TAOCP, Volume2 Seminumerical Algorithm.

Bye.


- Suman

Moni
Experienced poster
Posts: 202
Joined: Fri Mar 22, 2002 2:00 am
Location: Chittagong. CSE - CUET
Contact:

Post by Moni »

Hi! Suman & Rajib!
:D Suman your class implementation is good but as Rajib has sended it in C thread so you may think that he needs the functions which is supported by C only, not C++.

Besides your class is too big for real time contests isn't it?

Rajib,
If you are familiar with C++ class routines you may try with his class which is really good as a "Class"!!! :wink:
ImageWe are all in a circular way, no advances, only moving and moving!

suman
New poster
Posts: 45
Joined: Fri Oct 19, 2001 2:00 am
Contact:

Some URL

Post by suman »

Hi,
You are right moni the code is BIG, but if one understand the whole thing then its easy to chop the unwanted portion of the code during the contest. And sorry to rajib if I bothered you indicating the `thing'. However here is a url where you will get some very good implemntation of big number, both in C & C++.
http://www.mirrors.wiretapped.net/secur ... aries/math
An also try searching in http://www.sourceplanet.com

Good luck.

- Suman

Post Reply

Return to “C”