Personal tools

Floating point numbers

From HaskellWiki

Revision as of 17:21, 11 January 2008 by Lemming (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

1 Question

Why do floating point numbers behave so strange? Why is

Prelude> compare (0/0) (0/0)
Prelude> (0/0) > (0/0)


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: