I am sorry, I have a very basic question.
Here is a very simple calculation, an integer (22) divided by another integer (7). I would like the c++ code use exactly 100 digits of precision both in the actual calculation inside the code and in the output value. Using the Maple program, I get
restart;
Digits:=100;
evalf(22/7);
And the answer I get is,
3.142857142857142857142857142857142857142857142857142857142857142857142857142857142857142857142857143
But I use the following c++ code and get something different answer. This simply adds zeros after few actual digits, which is completely wrong. Below is my c++ code.
#include <iostream>
using namespace std;
int main()
{
cout << fixed;
cout.precision(100);
cout << "22/7 = " << 22/(double)(7) << endl;
return 0;
}