Subject: Recommendation: "What Every Computer Scientist Should Know About Floating-Point Arithmetic"

From: Shlomi Fish <[email-masked]>
Date: Fri, 5 Feb 2010 23:40:00 +0200

Hi all!

I've read the following paper and can recommend it:

http://docs.sun.com/source/806-3568/ncg_goldberg.html

"What Every Computer Scientist Should Know About Floating-Point Arithmetic"

It's a bit long, but not too long, and it's also enlightening. I've been 
getting quite a lot of requests for help and bug reports about problems 
induced by floating point issues while maintaining the following CPAN module:

http://search.cpan.org/dist/Statistics-Descriptive/

This article explains why people should not expect the impossible out of code 
like that. 

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

---

From: Chen Shapira <[email-masked]>
Date: Fri, 5 Feb 2010 13:51:59 -0800

The specific bug you refer to (error when attempting to calculate linear
regression slope where y=0.74) is not impossible to solve - R for example
will not give you an error.

Did you study Numerical Methods? There are many techniques for improving
accuracy during calculations that involve floating point numbers.

Chen

On Fri, Feb 5, 2010 at 1:40 PM, Shlomi Fish <[email-masked]> wrote:

> ----------------------------------------------------------

---

From: Shlomi Fish <[email-masked]>
Date: Sat, 6 Feb 2010 12:55:01 +0200

> will not give you an error.

What are you talking about?

> accuracy during calculations that involve floating point numbers.

I did not study numerical methods.

And please don't top-post.

Regards,

	Shlomi Fish

> > Please reply to list if it's a mailing list post - http://shlom.in/reply

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

---

From: Chen Shapira <[email-masked]>
Date: Sat, 6 Feb 2010 04:40:39 -0800

> What are you talking about?

I assumed you were talking in the context of this bug:
https://rt.cpan.org/Public/Bug/Display.html?id=113

Regardless of the context - if you enjoyed "What Every Computer
Scientist Should Know About Floating-Point Arithmetic", you will
probably enjoy the study of numeric analysis. The field of study
discusses problems of approximation and containment of errors.

Chen,

---

From: Chen Shapira <[email-masked]>
Date: Sat, 6 Feb 2010 04:44:56 -0800

> https://rt.cpan.org/Public/Bug/Display.html?id=113

I meant:  https://rt.cpan.org/Public/Bug/Display.html?id=11308
Sorry for mis-paste.

---

From: Shlomi Fish <[email-masked]>
Date: Sat, 6 Feb 2010 14:53:31 +0200

> I meant:  https://rt.cpan.org/Public/Bug/Display.html?id=11308

No, I was not talking about it in the context of this bug specifically. I got 
many reports about it.

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism