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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:47:09+00:00 2026-06-04T10:47:09+00:00

This string operation prints out a double in short-hand, and I can’t work out

  • 0

This string operation prints out a double in short-hand, and I can’t work out why. Why is this happening, and how can I get the full output like the first line of output?

string myString = "The value is ";
ss.str(""); // stringstream from ealier
ss.clear();
ss << myDouble; // Double with value 0.000014577
myString.append(ss.str());
cout << myDouble << endl;
cout << myString << endl;

$ ./myapp
0.000014577
The value is 1.4577e-05
  • 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-06-04T10:47:10+00:00Added an answer on June 4, 2026 at 10:47 am

    its default behaviour you should use precision to use fixed precision

    #include <string>
    #include <iostream>
    #include <iomanip>
    
    using namespace std;
    
    int main() {
    double v = 0.000014577;
    cout << fixed << v << endl;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I seek this sb string variable to get those variables:IMKB's value: 64882,72
I recently used the <<- operator to output a multi-line string, like this: <<-form
I use this string matchString = Regex.Match(sometext, <img.+?src=[\'](.+?)[\'].+?>, RegexOptions.IgnoreCase).Groups[1].Value; to get an images src.
This code works: class Test { public: Test(string name) : _name(name) {}; bool operator()()
I am getting this error in condiotional operator. string remarks=; AddDgvNew[6, i].Value==null?remarks=:remarks=AddDgvNew[6,i].Value.ToString();
Given the following: StreamLogger& operator<<(const char* s) { elements.push_back(String(s)); return *this; } StreamLogger& operator<<(int
Given this string HELLO水 Legend: http://en.wikipedia.org/wiki/UTF-16 is 4 bytes 水 is 2 bytes Postgresql
In this string: <0> <<1>> <2>> <3> <4> I want to match all instances
Given this string: Fri, 09 Apr 2010 14:10:50 +0000 how does one convert it
I have this string G234101,Non-Essential,ATPases,Respiration chain complexes,Auxotrophies, carbon and,PS00017,2,IONIC HOMEOSTASIS,mitochondria. That I have been

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.