http://bhudson.livejournal.com/ (
bhudson.livejournal.com
) wrote
in
meganursula
2008-09-11 09:04 pm (UTC)
no subject
Oh, and Eps implies you're comparing doubles wrong. Read this article, and love it:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
Then, yank out the AlmostEqual2sComplement function, rename it, and use that in all your comparisons.
(
26 comments
)
Post a comment in response:
From:
Anonymous
This account has disabled anonymous posting.
OpenID
Identity URL:
Log in?
Dreamwidth account
Account name
Password
Log in?
If you don't have an account you can
create one now
.
Subject
HTML doesn't work in the subject.
Formatting type
Casual HTML
Markdown
Raw HTML
Rich Text Editor
Message
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
Then, yank out the AlmostEqual2sComplement function, rename it, and use that in all your comparisons.