[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    [Rd] R_xlen_t is an integer type
From:       Suharto Anggono Suharto Anggono via R-devel <r-devel () r-project ! org>
Date:       2017-08-27 12:10:05
Message-ID: 1601411538.1678664.1503835805460 () mail ! yahoo ! com
[Download RAW message or body]

A recent R devel NEWS item: approx(), spline(), splinefun() and approxfun() also work \
for long vectors.

In current R devel, in function 'approx1' in src/library/stats/src/approx.c and in \
function 'spline_eval' in src/library/stats/splines.c, in #ifdef LONG_VECTOR_SUPPORT
there is a comment "R_xlen_t is double". It is incorrect. In Rinternals.h, in
#ifdef LONG_VECTOR_SUPPORT
R_xlen_t is defined as ptrdiff_t , an integer type.

In function 'approx1' in src/library/stats/src/approx.c,
	R_xlen_t ij = (i+j) / 2;
can be used unconditionally.

In function 'spline_eval' in src/library/stats/src/splines.c,
		R_xlen_t k = (i+j) / 2;
can be used unconditionally.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic