Personal tools

Floating point numbers

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(point to a discussion at Haskell-Cafe)
 
(Category:Mathematics)
 
Line 20: Line 20:
   
 
[[Category:FAQ]]
 
[[Category:FAQ]]
  +
[[Category:Mathematics]]

Latest revision as of 23:35, 31 January 2009

[edit] 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

?

[edit] 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: