Bug or is it me?

Chosechu chosechu at gmail.com
Sun Oct 30 10:56:22 UTC 2005


Rogelio Nodal wrote:
> Hello List:
> 
>     Is this a bug?Or is it me?
[code]

Floating-point numbers (be it float or double) are just one
representation for numbers, they do not have infinite precision
like you can have in the purely theoretical world of mathematics.
This representation has been chosen for many reasons you should
be aware of. You should also know about its limitations.
The following paper is a must-read if you need to work with
floating-point numbers:

What Every Computer Scientist Should Know About Floating-Point
Arithmetic
http://docs.sun.com/source/806-3568/ncg_goldberg.html
(you can find PDF versions of the above if you google the title).

You will understand why operations == <= >= != do not have
meaning for floating-point numbers and how to actually perform
them when you need to.

But this has nothing to do with Ubuntu. Thanks for taking the
discussion off-list.

Cheers
-- 
Chosechu <chosechu at gmail.com>




More information about the ubuntu-users mailing list