On 06/12/2013 15:51, Luis Carvalho wrote:
And to be safer on a 64-bit platform
#define INDEX(i,j) ((i) + rows*(R_xlen_t)(j))
since rows*j might overflow there.
Shouldn't 'rows' be also a parameter?
This is a macro, not a function. 'rows' (I would have use nr or nrows)
is going to be the same at all invocations.
#define INDEX(rows,i,j) ((i) + (rows)*((R_xlen_t)(j)))
Cheers,
Luis
--
Brian D. Ripley, rip...@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel