Hi
Can any one tell me how can i add largest floating point nos in machine the result may largest no as possible in my machine
thanks in advance
Dhiraj
Hi
Can any one tell me how can i add largest floating point nos in machine the result may largest no as possible in my machine
thanks in advance
Dhiraj
In order to use very huge floating point numbers or floating point numbers with a large number of digits after the comma you need to design your own datastructure and operations that will work on it.
If you do a search on this board, you will find some other threads about this.
Hi can u give me one example
There are many ways to do this. One way is to use linked lists, where each node contains a digit.
You could define a special character to represent the comma.Code:typedef struct _digit_s digit_s; struct _digit_s { char digit; digit_s *next_digit; };
Then you could do things just the same way you would do it on paper. Take care of the comma-position and the carry.Code:#define COMMA -1
A different approach is using strings to store a number.
Download a package called NTL and link in into your program. It has a class for large float operations with arbitrary precision.
Second time I have recommended this in ten minutes.