Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
AvoidFloatingPointEqualityRule
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vlad  
View profile  
 More options Oct 19, 1:17 pm
From: Vlad <vladimir.giszp...@gmail.com>
Date: Mon, 19 Oct 2009 10:17:34 -0700 (PDT)
Local: Mon, Oct 19 2009 1:17 pm
Subject: AvoidFloatingPointEqualityRule
My code got flagged for doing what is suggested.  What is wrong with
the following code?

return (Math.Abs(definitionValue - actualValue) < float.Epsilon);

P.S. Any chance on bringing the MonoDevelop Add-in up to date?

Thanks!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastien Pouliot  
View profile  
 More options Oct 19, 5:43 pm
From: Sebastien Pouliot <sebastien.poul...@gmail.com>
Date: Mon, 19 Oct 2009 17:43:23 -0400
Local: Mon, Oct 19 2009 5:43 pm
Subject: Re: [gendarme] AvoidFloatingPointEqualityRule

On Mon, 2009-10-19 at 10:17 -0700, Vlad wrote:
> My code got flagged for doing what is suggested.  What is wrong with
> the following code?

> return (Math.Abs(definitionValue - actualValue) < float.Epsilon);

The solution is a bit more complex than that and the rule documentation
is updated for 2.6 (but not yet on the wiki). I don't recall the rule
source enough to see why it fails... I'll check that up later (likely
next weekend).

Not that opening a bug report (on bugzilla.novell.com) is a good way to
make sure I won't forget about it :)

> P.S. Any chance on bringing the MonoDevelop Add-in up to date?

No, unless someone step up to the task. Got a itch to scratch ? ;-)

Most Gendarme contributors don't know much about MD internals - but have
promised much help to anyone willing to contribute working on this.
Actually Michael and me discussed this a few times so we have a (or
some) very good idea(s) about it (sadly much more ideas than time to do
it)

Sebastien


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google