Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 61023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:15:13+00:00 2026-05-10T18:15:13+00:00

I have trouble comparing 2 double in Excel VBA suppose that I have the

  • 0

I have trouble comparing 2 double in Excel VBA

suppose that I have the following code

Dim a as double Dim b as double a = 0.15 b = 0.01 

After a few manipulations on b, b is now equal to 0.6

however the imprecision related to the double data type gives me headache because

if a = b then  //this will never trigger end if 

Do you know how I can remove the trailing imprecision on the double type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:15:14+00:00Added an answer on May 10, 2026 at 6:15 pm

    You can’t compare floating point values for equality. See this article on ‘Comparing floating point numbers‘ for a discussion of how to handle the intrinsic error.

    It isn’t as simple as comparing to a constant error margin unless you know for sure what the absolute range of the floats is beforehand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer In a project that you build, reference the dll and… May 11, 2026 at 10:05 am
  • added an answer Settings are stored under the Application folder and as such,… May 11, 2026 at 10:05 am
  • added an answer There are samples all over the web, what is it… May 11, 2026 at 10:05 am

Related Questions

I have trouble comparing 2 double in Excel VBA suppose that I have the
I have trouble with the following piece of code. When I go through with
I have trouble using Perl grep() with a string that may contain chars that
I have trouble defining a trigger for a MySQL database. I want to change
I have no trouble building 1.35.0, as well as 1.36.0 on the timesys arm-gcc
I have being having trouble with the web server used for our intranet. It
I have created some rounded navigation tabs using CSS and am having trouble when
I am having trouble with IE7. I have a header, which is an IMG.
I having trouble in dividing the HTML frames. I have been using the following
I'm having trouble with global variables in php. I have a $screen var set

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.