--- In [email protected], "Vivek" <[EMAIL PROTECTED]> wrote: > > Setting precision in input/output mode is fine but what > about if I want to set precision for any double or float > say upto n significant digits only? so that even > compiler, during its computations will consider as if > the number had n significant digits only. <snip>
Your questions call for you using Java; in Java there's a standard package named BigDecimal which can do exactly what you want. I'm pretty sure similar libraries exist for C/C++, but to be honest I don't know any, except maybe the GNU MP library (gmp)... Regards, Nico
