You are here:

C/handling of large numbers in c++

Advertisement


Question
dear sir,
 I am a student of M.Sc(maths) in IIT(DELHI).
i am working on a problem finding quadratic residue for large numbers.my problem is how to handle large numbers(like 200 digits and more) in c++ language

Answer
With current limitations, I don't think that is possible.
But, you can use your own functions to achieve this.
Use an array to hold the number - each digit in each array member.
And now you have to write your own addition, subtraction, multiplication or whatever mathematical functions you want and use array all the way.
"Vedic Mathematics" comes in handy in doing this.
17 years back, I had written such routines using "Vedic Mathematics".
Not just 200 digits, even 20,000 digits was also possible with that.
But, I don't have any of those programs today.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.