I'm creating a program that does a large number of very specific calculations and currently facing the following situation:
I have a number: 1758.45 that is an initial input to a large calculation. After computing the output I receive an incorrect number. I noticed that calculations were very slightly off (0.000000000000000000001 instead of 0.000000000000000000002) and eventually I traced the miscalculation back to the number above (1758.45).
Now the problem that I'm having is that when I print the above number I get:
Whereas the number should be just 1758.45.
I've initialized it as:
double x = 1758.45;
And I'm printing it out via:
#include <iostream>
std::cout.precision(75);
std::cout << (x) << std::endl;
Are these numbers the cause of my miscalculation? Or is it just a matter of how I'm printing the number out (x is not really stored with the additional values)?