So it's a machine/OS issue: if you really want to trace it down, take
a look here: http://svn.r-project.org/R/trunk/src/main/seq.c
seq.int() in R goes to do_seq() in C, but at this point it's probably
best to identify it as floating-point gremlins and to work around.
Michael
On Tue, Apr 10, 2012
Thank you Michael
It is indeed the OS
identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # FALSE
Michael Weylandt wrote
>
> What difference is it you are worried about:?
>
> identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # TRUE
>
> Though that may be OS dependen
What difference is it you are worried about:?
identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # TRUE
Though that may be OS dependent.
M
On Tue, Apr 10, 2012 at 10:51 AM, Alexander wrote:
>
> Berend Hasselman wrote
>>
>> On 10-04-2012, at 15:54, Alexander wrote:
>>
>>> I am work
Berend Hasselman wrote
>
> On 10-04-2012, at 15:54, Alexander wrote:
>
>> I am working under R2.11.1 Windows and I was wondering why there is a
>> difference between
>>
>> seq.int(0,1,by=0.1)[4]-0.3
>> seq.int(0,1,length.out=11)[4]-0.3
>>
>> there is also the fact that
>>
>> seq(0,1,by=0.1)[
On 10-04-2012, at 15:54, Alexander wrote:
> I am working under R2.11.1 Windows and I was wondering why there is a
> difference between
>
> seq.int(0,1,by=0.1)[4]-0.3
> seq.int(0,1,length.out=11)[4]-0.3
>
> there is also the fact that
>
> seq(0,1,by=0.1)[4]-0.3
> seq(0,1,length.out=11)[4]-0.3
I am working under R2.11.1 Windows and I was wondering why there is a
difference between
seq.int(0,1,by=0.1)[4]-0.3
seq.int(0,1,length.out=11)[4]-0.3
there is also the fact that
seq(0,1,by=0.1)[4]-0.3
seq(0,1,length.out=11)[4]-0.3
but I think this can be explained by floating precision...
A
6 matches
Mail list logo