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

  • SEARCH
  • Home
  • 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

Related Questions

I have trouble finding way to correctly refactor this code so that there would
I have the problem that my code returns different results when comparing debug to
I have some trouble forward declaring a function that uses boost::enable_if : the following
I'm having some trouble comparing values found in VARCHAR fields. I have a table
I have trouble launching Glassfish v3 on Mac In Windows, after installation of Glassfish
I am having trouble comparing mongoose ObjectId's or their String values. I have two
Now I have one trouble for develope one iPhone app. I need to compute
I'm having trouble compiling the code below. It may also have logical errors, please
I'm converting GraphicEx project to Delphi 2009. I have trouble in converting following procedure
I have this method (Matrix::WriteToArray(double &CopyOfArray)) that I want to write a copy of

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.