i was thinking of character array. which is same as string.
Any thoughts on better alternatives?
On Friday, 6 July 2012 13:34:01 UTC-4, anshu wrote:
yes, We can have much better data structure for storing big integer
instead of string just for simplicity I have taken string.
On Fri, Jul 6,
Best will be storing BIG_INT in array of integers.
int [] val; //store actual number
int size; // required length of val array.
take the string as input for constructors and convert it into 2's
complement form, maintaining little endian order or big endian order.
Perform other operation keeping
@anshuman...
Are you converting numbers to string because data types ranges
and precision differs? or is there any other reason?
-mithun
On Fri, Jul 6, 2012 at 12:58 AM, payal gupta gpt.pa...@gmail.com wrote:
thnx...4 d rply..
Regards,
PAYAL GUPTA,
NIT-B.
On Fri, Jul 6, 2012 at 12:43
yes, We can have much better data structure for storing big integer instead
of string just for simplicity I have taken string.
On Fri, Jul 6, 2012 at 11:11 AM, Mithun Kumar mithunsi...@gmail.com wrote:
@anshuman...
Are you converting numbers to string because data types ranges
and precision
First define all the basic operation you can apply on two numbers.
Binary operation : +, -, *, /, %, optional((and), |(or), ^(xor))
Unary operation : !, ~, -
Comparison : , ==, !=
Define all these operation.
Most simplest one can be,
class BIG_INT {
private string val;
//Define
thnx...4 d rply..
Regards,
PAYAL GUPTA,
NIT-B.
On Fri, Jul 6, 2012 at 12:43 AM, Anshu Mishra anshumishra6...@gmail.comwrote:
First define all the basic operation you can apply on two numbers.
Binary operation : +, -, *, /, %, optional((and), |(or), ^(xor))
Unary operation : !, ~, -
can you elaborate question...what is BIG_INT?
On Sun, Jul 1, 2012 at 8:13 PM, payal gupta gpt.pa...@gmail.com wrote:
design a BIG_INT library...
Regards,
PAYAL GUPTA,
NIT-B.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
design a BIG_INT library...
Regards,
PAYAL GUPTA,
NIT-B.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/EHIiPPFJ4t0J.
To post to this group, send email to