HaskellWiki

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

 

Not logged in
Log in | Help

Floating point numbers

Categories: FAQ

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://www.haskell.org/haskellwiki/Floating_point_numbers"

This page has been accessed 359 times. This page was last modified 17:21, 11 January 2008. Recent content is available under a simple permissive license.