Re: [R] Creating logical value from the difference of two absolute values

2004-11-20 Thread Martin Maechler
DougB == Douglas Bates [EMAIL PROTECTED] on Fri, 19 Nov 2004 06:59:49 -0600 writes: DougB Nathan Leon Pace, MD, MStat wrote: Hi, Using R 2.0.1 on Mac g5 running Mac OS X 10.3.6. I would expect that abs(.7 - .5) = abs(.3 - .5) should be returned

Re: [R] Creating logical value from the difference of two absolute values

2004-11-19 Thread Douglas Bates
Nathan Leon Pace, MD, MStat wrote: Hi, Using R 2.0.1 on Mac g5 running Mac OS X 10.3.6. I would expect that abs(.7 - .5) = abs(.3 - .5) should be returned TRUE. Instead www - abs(.7 - .5) = abs(.3 - .5) www [1] FALSE Is this a result of floating point or the implementation of abs or something

[R] Creating logical value from the difference of two absolute values

2004-11-18 Thread Nathan Leon Pace, MD, MStat
Hi, Using R 2.0.1 on Mac g5 running Mac OS X 10.3.6. I would expect that abs(.7 - .5) = abs(.3 - .5) should be returned TRUE. Instead www - abs(.7 - .5) = abs(.3 - .5) www [1] FALSE Is this a result of floating point or the implementation of abs or something else? In a function I need to