[Rd] code for sum function

2019-02-18 Thread Rampal Etienne
where can I find the code for the sum function? Regards, Rampal Etienne __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] code for sum function

2019-02-21 Thread Rampal Etienne
m in this way or not (they are declared as doubles and I think the compiler treats then as doubles). So my question remains what algorithm R uses. Cheers, Rampal > > On 2/14/19 2:08 PM, Rampal Etienne wrote: > > Hello, > > > > I am trying to write FORTRAN code to do the same

Re: [Rd] code for sum function

2019-02-21 Thread Rampal Etienne
. R uses long double > type as accumulator on systems where available. > > Best, > Tomas > > On 2/14/19 2:08 PM, Rampal Etienne wrote: > > Hello, > > > > I am trying to write FORTRAN code to do the same as some R code I > > have. I get (small) differences wh

Re: [Rd] code for sum function

2019-02-21 Thread Rampal Etienne
ting point numbers you use! >> >> 3/ You have not zeroed the double precision numbers in fortran. (Some >> compilers do not do this automatically and you have to specify it.) Then >> if you accidentally put singles, like a constant 0.0 rather than a >> constant 0.0D+0, into a