Re: [R] Numerical accuracy

From: Tuszynski, Jaroslaw W. <>
Date: Tue 28 Jun 2005 - 01:47:48 EST

I do not know about details of numerical accuracy of R, it is probable related to numerical accuracy of C compiler that was used to compile it (gcc ?).
However I would like to mention that I run into some problems with accuracy of sum and cumsum functions. See:

> x = c(1, 1e20, 1e40, -1e40, -1e20, -1)
> sum(x)

   [1] -1e+20
> cumsum(x)

   [1] 1e+00 1e+20 1e+40 0e+00 -1e+20 -1e+20 And wrote functions (with help of R-Help list) to address the problem. See sum.exact and cumsum.exact in caTools package:   > sum.exact(x)
  [1] 0
  > cumsum.exact(x)
  [1] 1e+00 1e+20 1e+40 1e+20 1e+00 0e+00  



 Jarek Tuszynski, PhD.                           o / \ 
 Science Applications International Corporation  <\__,|  
 (703) 676-4192                                   ">   \                     `    \


-----Original Message-----
[] On Behalf Of Talita Perciano Costa Leite
Sent: Monday, June 27, 2005 10:57 AM
Subject: [R] Numerical accuracy

Hi people,

I need to prove the good quality of numerical accuracy of R. Anyone knows a paper or anything else comparing R to other statistical softwares in terms of numerical accuracy.
I've made a long search about that but I found nothing. Please help me!!


Talita Leite

Este e-mail foi enviado pelo Webmail da UFAL IMP: mailing list PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Tue Jun 28 01:52:38 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:03 EST