My code should calculate with maximum precision different powers of different ints. Sometimes I have problem digits after nought point.
Example code:
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;
int main()
{
cout << setprecision(10000);
int length = 5;
long double Maxi = pow(10, length);
cout << Maxi << endl;
return 0;
}
prints
100000.00000000000000710542735760100185871124267578125
instead of
100000
Screen: http://postimg.org/image/epdsrinkx/
Is it something to worry about or should I just round down and forget about it?