// Euler.cc // g++ Euler.cc // -lm // Euler number // limited accuracy #include #include main() { float e1; long long int i,n,m,j; n = 1000; m = 100000; for (i=1; i<=n; i++) { j = i*m; e1 = pow(1.0+1.0/j,double(j)); cout << "e - e1 = " << exp(1) - e1 << endl; } cout << endl << "e = " << exp(1) << endl; // M_E is the predefined Euler number (/usr/include/math.h) cout << endl << "e = " << M_E - exp(1) << endl; // M_PI is the predefined PI number (/usr/include/math.h) cout << M_PI << " " <