Notice: Undefined offset: 8387574 in /var/www/html/qa-external/qa-external-users.php on line 744
Why double are used in c++ calculator program - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Why double are used in c++ calculator program

+6 votes
asked Oct 3, 2025 by Abhay p (180 points)

2 Answers

0 votes
answered Oct 5, 2025 by (140 points)
for more precision. for example: float: 4 bytes size, 7 decimal digits precision, double: 8 bytes size, 15 decimal digits precision.
0 votes
answered Oct 14, 2025 by Ashish Dangi (140 points)

double are used in c++ in the defined a function in the system 

and the 8 bytes of this primitive 

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...