Hi there, When I enter a particularly long number into R it rounds it down into scientific notation. For example,> 2510000002679[1] 2.51e+12 How can I preserve the precision of the original number? Regards, Wayne Dr Wayne R. Jones Statistician / Research Analyst KSS Group plc St James''s Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713 KSS Ltd A division of Knowledge Support Systems Group plc Seventh Floor St James''s Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 (Limited) 3449594 (plc) Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:kssg@kssg.com http://www.kssg.com The information in this Internet email is confidential and may b... [[dropped]]
On Fri, 21 Mar 2003, Wayne Jones wrote:> Hi there, > > When I enter a particularly long number into R it rounds it down into > scientific notation. > For example, > > > 2510000002679 > > [1] 2.51e+12 > > How can I preserve the precision of the original number?It has been preserved:> a<-2510000002679 > 2510000000000-a[1] -2679 For numbers above 2^31 (or whatever .Machine$integer.max is), you have to use floating point, which gives you about 15 digits accuracy. If you want to print a number to more digits than the default, use the digits= option to print(), or change options(digits) -thomas