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

Expand Messages
• 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
Message 1 of 6 , Feb 5, 2010
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.

• 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
Message 2 of 6 , Feb 5, 2010
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 wrote:

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.

• ... What are you talking about? ... I did not study numerical methods. And please don t top-post. Regards, Shlomi Fish ... -- ... Shlomi Fish
Message 3 of 6 , Feb 6, 2010
On Friday 05 Feb 2010 23:51:59 Chen Shapira wrote:
> 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.
>

I did not study numerical methods.

Regards,

Shlomi Fish

> Chen
>
> On Fri, Feb 5, 2010 at 1:40 PM, Shlomi Fish <shlomif@...> wrote:
> > 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.
> >

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

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

• ... 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
Message 4 of 6 , Feb 6, 2010
On Sat, Feb 6, 2010 at 2:55 AM, Shlomi Fish <shlomif@...> wrote:
> On Friday 05 Feb 2010 23:51:59 Chen Shapira wrote:
>> 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.
>>
>
> 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,
• ... I meant: https://rt.cpan.org/Public/Bug/Display.html?id=11308 Sorry for mis-paste.
Message 5 of 6 , Feb 6, 2010
> I assumed you were talking in the context of this bug:
> 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.
• ... 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
Message 6 of 6 , Feb 6, 2010
On Saturday 06 Feb 2010 14:44:56 Chen Shapira wrote:
> > I assumed you were talking in the context of this bug:
> > 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.

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

Regards,

Shlomi Fish

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

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