Discussion on rules-todo-comments-enhancements

0 views
Skip to first unread message

jesse99

unread,
Jul 24, 2009, 8:38:47 PM7/24/09
to Gendarme
Gendarme.Rules.Correctness.AvoidFloatingPointEqualityRule

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
to Gendarme

jesse99

unread,
Jul 24, 2009, 8:44:19 PM7/24/09
to Gendarme
have very small magnitudes...

jesse99

unread,
Aug 5, 2009, 10:29:53 AM8/5/09
to Gendarme


Click on http://groups.google.com/group/gendarme/web/rules-todo-comments-enhancements?hl=en
- or copy & paste it into your browser's address bar if that doesn't
work.

jesse99

unread,
Aug 5, 2009, 10:35:01 AM8/5/09
to Gendarme

jesse99

unread,
Aug 19, 2009, 12:28:16 PM8/19/09
to Gendarme
Reply all
Reply to author
Forward
0 new messages