-----BEGIN PGP SIGNED MESSAGE-----

In article <1a8fc4a0.0308040614.3902c0ed / posting.google.com>,
Jean-Claude Arbaut <jcarbaut / sailormoon.com> wrote:
><bbense+comp.lang.ruby.Aug.02.03 / telemark.slac.stanford.edu> wrote in message news:<bggl6e$d94$2 / news.Stanford.EDU>...
>> 
>> - - The computational results are all "0" as well, they way to test 
>> floating point computations for equality is to see if the
>> absolute value of their difference is less than EPS. Frankly, 
>> I don't understand how this comes as a surprise to people. 
>> You should not be allowed to use the / operator unless you
>> understand this. 
>> 
>> - - Booker C. Bense  
>
>I don't understand the reason why you show such vanity, or why you
>need to make fun of previous posts. 

_ I guess the smiley was missing. I don't mean to offend, but
I've seen this topic come up over and over again on this list.
It makes me wonder, do they no longer teach floating point in CS,
or are there just that many people coming to programming with
no educational background? Certainly if you teach yourself 
programming through various books on scripting languages 
you won't run across this issue until it's too late. 

> It's a fact that numerical analysis
>is a difficult domain, and unless you are able to explain each line
>of code in Netlib (for example :-), you shouldn't "be allowed to"
>post such things.

_ Well, it's been quite some time since I got paid to do that,
but at one point that was my job.... Unfortunately, you can't
make much money doing that. 

>In fact it is even funny to read your answer. I don't think it's
>a good idea to test equality that way. It will work in some cases,
>whene your numbers are near 1. 

_ Yes, I was being sloppy, since all the numbers were near zero. 
But this does make your point, I know better and I still didn't
get it right. 

> I'd rather use a "relative" error,
>and sometimes it may be more complicated. It depends on what you
>need to compare. Here it's stupid to test absolute difference, since
>the goal was to show why you must not use "a!=b" with floating point
>numbers.

_ Sorry you took offense. I certainly don't mean to lower the
quality of debate on this list. My apologies. 

_ Booker C. Bense 



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBPzF5tmTWTAjn5N/lAQEytAQAnVB0jZ1NfxA1G2M/X+Mu/eEyCSAFsfjM
JnDz4Kbb5SQCm917NSCZQrmoPEVdhQqKZ1jTh31AYCrxGINdmkMaaf3Kx62wnQN8
x4aRvdxw1b871FZURO+mPQNhBI3gHF7+2186hXpsZBNM1pFfGpzx4LAWPme+1D6K
cztDsB1vQ+I=
=agvn
-----END PGP SIGNATURE-----