From suharto_anggono at yahoo.com  Sun Aug 27 14:10:05 2017
From: suharto_anggono at yahoo.com (Suharto Anggono Suharto Anggono)
Date: Sun, 27 Aug 2017 12:10:05 +0000 (UTC)
Subject: [Rd] R_xlen_t is an integer type
References: <1601411538.1678664.1503835805460.ref@mail.yahoo.com>
Message-ID: <1601411538.1678664.1503835805460@mail.yahoo.com>

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.



[Rd] R_xlen_t is an integer type
Suharto Anggono Suharto Anggono