Re: [algogeeks] store fractional numbers with high precision

2010-04-13 Thread Himanshu Aggarwal
I think it should depend on the underlying architecture, on how it stores the floating data types In case floats and double are implemented using IEEE 754, then floats have 8 bits for precision and double have 11 bits for precision. Normally the exponents are biased, which means that for float it

Re: [algogeeks] First k smallest elements

2010-04-13 Thread Priyanka Chatterjee
On 12 April 2010 23:57, souri datta souri.isthe...@gmail.com wrote: Why only median of median? @Souri: It's because using order statistics (randomized select) , you have an expected time complexity of theta(n) . But the upper bound is n^2 even to find the smallest element. So to ensure

Re: [algogeeks] store fractional numbers with high precision

2010-04-13 Thread Himanshu Aggarwal
I think it should depend on the underlying architecture, on how it stores the floating data types In case floats and double are implemented using IEEE 754, then floats have 8 bits for precision and double have 11 bits for precision. Normally the exponents are biased, which means that for float it

Re: [algogeeks] store fractional numbers with high precision

2010-04-13 Thread sharad kumar
Do u have to use only C++ ,cant u use scripting languages like Pythonwhere precision is very good in Python..esp wen u use Si-Py On Tue, Apr 13, 2010 at 10:10 PM, Himanshu Aggarwal lkml.himan...@gmail.com wrote: I think it should depend on the underlying architecture, on how it stores