[R] Bug in "is" ?
Wacek Kusnierczyk
Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Mon Sep 29 14:17:56 CEST 2008
Wacek Kusnierczyk wrote:
> Peter Dalgaard wrote:
>
>> Stefan Evert wrote:
>>
>>
>>> ... am I the only one who thinks that the integer 7 is something
>>> entirely different from the real number 7.0? (The latter most likely
>>> being an equivalence class of sequences of rational numbers, but that
>>> depends on your axiomatisation of real numbers.) Integers can be
>>> embedded in the set of real numbers, but that doesn't make them the
>>> same mathematically.
>>>
>>>
>>>
>> Several people have tried to make that point (or something very
>> similar), but it doesn't seem to take.
>>
>> It might get clearer if taken one step up: is.double(-1+0i) is not true
>> either, even though the real line is cleanly embedded in complex space,
>> -1+0i is not the same as -1. For instance, you can take the square root
>> of the former but not the latter.
>>
>>
>
> you see, there seems to be a confusion of *numbers* and their
> *representations*.
> but of course the integer 7 is *the same* number as the real number 1.0,
>
oops, a typo; the integer 7 is the same number as the real number *7.0*.
every integer is real, and the set of real numbers does not contain both
the integer 7 and the real 7.0 as two distinct numbers.
vQ
More information about the R-help
mailing list