[ ghc-Bugs-815511 ] Floating pt. arithmetic bugs / inexplicable
inaccuracy
SourceForge.net
noreply at sourceforge.net
Wed Oct 1 04:55:26 EDT 2003
Bugs item #815511, was opened at 2003-09-30 23:48
Message generated for change (Comment added) made by simonmar
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=815511&group_id=8032
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Joe Lee (yjo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Floating pt. arithmetic bugs / inexplicable inaccuracy
Initial Comment:
in ghci 6.0.1, eg:
Prelude> 1.1 + 2.2
3.3000000000000003
----------------------------------------------------------------------
>Comment By: Simon Marlow (simonmar)
Date: 2003-10-01 08:55
Message:
Logged In: YES
user_id=48280
True, 1.1 2.2 and 3.3 are all representable as doubles, it
seems, so why does 1.1 + 2.2 not give the exact answer?
I get the same result from a C program, so I don't think
this is specific to GHC.
Any experts on floating point arithmetic want to comment on
why this happens?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=815511&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list