Advertisement

04.24.2003 at 02:22PM PDT, ID: 20595580
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

Erroneous math calculations in MS Visual Basic 6.0 (and .NET)

Asked by c0dejunkie in Visual Basic Programming, Microsoft Programming

Tags: ,

In the past few days, my coworkers and I have discovered that we are getting some very disturbing results doing simple floating point math in Visual Basic 6.0 (SP5) running on Windows 2000 (SP2). Using just the VB "Immediate" window, the following statements were executed with the indicated results.

? 45.21 - 45
 0.210000000000001

? 4521 - 4500
 21

? (4521 - 4500)/100
 0.21

? ((45.21*100)-(45*100))/100
 0.210000000000001

? 123.0567 - 123
 5.67000000000064E-02

Writing a simple application to do essentially the same thing, the application was compiled and executed on a Windows 98 machine also in our office with the same results. Additionally, we opened our .NET environment and performed similar tests in C# with the same floating point errors.

Frankly, I'm just blown away by this. I don't understand how it could possibly be occuring in all our machines with a product used world-wide.

My question is merely this; Is anyone else experiencing this issue, and is there a solution?
I will award the points (meager as they are) to the first person that can provide me a definative answer, preferably with a solution. However, I am very curious to hear if anyone else is experiencing this issue, too.

Thanks for your assistance.
-Ross
Start Free Trial
[+][-]04.24.2003 at 02:34PM PDT, ID: 8391417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2003 at 04:46PM PDT, ID: 8391939

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, Microsoft Programming
Tags: basic, visual
Sign Up Now!
Solution Provided By: PhiliP
Participating Experts: 4
Solution Grade: A
 
 
[+][-]04.24.2003 at 05:19PM PDT, ID: 8392023

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2003 at 01:51AM PDT, ID: 8393722

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2003 at 02:34AM PDT, ID: 8393899

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2003 at 04:02AM PDT, ID: 8394276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2003 at 08:27AM PDT, ID: 8395989

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2003 at 09:26AM PDT, ID: 8396462

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32