fork download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <limits>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double x = 1.57079632679489666901;
  10. double y = nextafter(x, numeric_limits<double>::max());
  11. cout << fixed << tan(x) << endl;
  12. cout << fixed << tan(y) << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
16331239353195370.000000
-6218431163823738.000000