HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Request an account if you don't have one.

Floating point numbers

Categories: FAQ | Mathematics

1 Question

Why do floating point numbers behave so strange? Why is

Prelude> compare (0/0) (0/0)
GT
Prelude> (0/0) > (0/0)
False

?

2 Answer

This has nothing to do with Haskell, but exclusively with the underlying implementation of floating point numbers in your system.

See for instance:

Retrieved from "http://haskell.cs.yale.edu/haskellwiki/Floating_point_numbers"

This page has been accessed 1,267 times. This page was last modified 23:35, 31 January 2009. Recent content is available under a simple permissive license.