Re: [Rd] double in summary.c : isum

2013-03-25 Thread Prof Brian Ripley
On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000),

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1]

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 11:27, Matthew Dowle wrote: On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 11:31, Matthew Dowle wrote: On 25.03.2013 11:27, Matthew Dowle wrote: On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew

Re: [Rd] double in summary.c : isum

2013-03-24 Thread Duncan Murdoch
On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000), rep(-x,999))) [1] 1073741824 Tested on 2.15.2 and a

Re: [Rd] double in summary.c : isum

2013-03-23 Thread Prof Brian Ripley
On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000), rep(-x,999))) [1] 1073741824 Tested on 2.15.2 and a recent R-devel (r62132). I'm wondering if s in isum could be LDOUBLE instead of double,