#not getting the whole value of double
19 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
cout<<std::setprecision(15)<<std::fixed<<d<<"\n"
also, there will be rounding errors when you use double for these values
@fair kite
So, it will print upto 15 decimals?
yes, that should be the limit of double
oh right
https://float.exposed/0x465b8538
here is the actual value
Floating point format explorer – binary representations of common floating point formats.
double is like 16 bits after decimal and 48 bits on the left side right?
oh thanks.
Actually I was confused.
cout<<showpoint<<d;
or
cout<<fixed<<setprecision(whatever_number_you_want)<<double_value; ```
!solved
Thank you and let us know if you have any more questions!
[SOLVED] not getting the whole value of double
Thankyou @hard hemlock @ornate plover