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 7513289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:08:13+00:00 2026-05-30T00:08:13+00:00

The following assertion fails in RAD Studio 2010 (and incidentally would succeed in Visual

  • 0

The following assertion fails in RAD Studio 2010 (and incidentally would succeed in Visual Studio 2010):

double              d1 = 0.0104;
double              d2 = 0.0;
std::istringstream  ss("0.0104");
ss >> d2;
assert(d1 == d2);

This surprised me a little. I traced down into the extraction operator to see what was happening, got as far as dinkumware/xlocnum, and couldn’t trace any further.

Can anyone tell me why __Stodx(... "0.0104") returns a value that’s marginally different from a double initialized to 0.0104?

(I know that certain values can’t be represented exactly in binary. What I want to know is why the resultant doubles contain different values so that I can understand it.)

Thanks!

  • 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. Editorial Team
    Editorial Team
    2026-05-30T00:08:16+00:00Added an answer on May 30, 2026 at 12:08 am

    Dear Me: The compiler and library use different methods to convert strings to doubles, and without access to the compiler source, nobody is going to be able to tell you how those methods differ.

    Sorry,
    Me

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

Sidebar

Related Questions

When running valgrind on the following program the assertion fails: #include <unistd.h> #include <sys/mman.h>
I have the following code in one of my tests. The second assertion fails.
I am getting the following error when running my program. Debug Assertion Failed! File:
I'm trying to add a custom assert to phpunit, following this tutorial , to
The assertion in the following program gives different results according to the compiler used:
I'm trying to use cv::calcOpticalFlowPyrLK but sometimes an internal assertion in that function fails.
Following is the association between 2 models: class FotoGossip < ActiveRecord::Base has_many :uploads end
Following recent hardware problems, I attempted to switch a couple of our websites to
Following the suggestions of FxCop and my personal inclination I've been encouraging the team
Following query is used for Getting Categories and one news for each category. How

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.