fork(18) download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. int main()
  5. {
  6. std::cout.precision(17);
  7. std::cout << std::nextafter(1., 0.) << std::endl;
  8. std::cout << std::nextafter(1., 2.) << std::endl;
  9. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
0.99999999999999989
1.0000000000000002