Note that the solution presented is the one typically used but it is
not a general solution because it requires users to supply an epsilon
which is only possible if users have a good idea of what the typical
values are.
It is possible to generate the epsilon values. For example, you can
use a multiple of the smallest representable double (double.Epsilon)
or scale an epsilon like 1e-6 using the magnitudes of the values being
tested. But these won't always perform as people expect. For example,
numbers very near zero will not compare equal to zero. This can be
fixed of course, but then the method will not work if typical values
have very small magnitudes...
jesse99
unread,
Jul 24, 2009, 8:43:47 PM7/24/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gendarme
jesse99
unread,
Jul 24, 2009, 8:44:19 PM7/24/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gendarme
have very small magnitudes...
jesse99
unread,
Aug 5, 2009, 10:29:53 AM8/5/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message