Hi, I would like to increase the Precision of R by increasing the Number of decimal places in calcultaions. I get about 7 decimal places and would like to have over 15. is the a means to inflence this? Thanks ========================Sylvie B. Forkusam Eppelheimer Str.52/A2-5-2 69115 Heidelberg, Germany Tel: (0049)-06221/346913 Mobile: 0179-6816276
I think you want to change the number of digits that are *printed*. Try doing options(digits = 15) -roger forkusam wrote:> Hi, > I would like to increase the Precision of R by > increasing the Number of decimal places in > calcultaions. I get about 7 decimal places and would > like to have over 15. is the a means to inflence this? > Thanks > > ====> ====================> Sylvie B. Forkusam > Eppelheimer Str.52/A2-5-2 > 69115 Heidelberg, Germany > Tel: (0049)-06221/346913 > Mobile: 0179-6816276 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
forkusam wrote:> Hi, > I would like to increase the Precision of R by > increasing the Number of decimal places in > calcultaions. I get about 7 decimal places and would > like to have over 15. is the a means to inflence this?R uses double-precision for *all* internal floating point numbers. These are 64 bits, on most machines these days. If you want to change the *display* of your results, use format() e.g. pi format(pi, digits=15) If you find that you're getting rounding error in your calculations when using R, check your calculation or algorithm, and see if there's a more numerically stable way to do it. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz