fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float start = -3.1400001049041748046875;
  6. float end = 3.1400001049041748046875;
  7. float step = 0.098125003278255462646484375;
  8.  
  9. double value = start;
  10.  
  11. cout.precision(15);
  12. cout << value << '\n';;
  13. while (value != end)
  14. {
  15. value += step;
  16. cout << value << '\n';
  17. }
  18. }
Success #stdin #stdout 0s 4320KB
stdin
Standard input is empty
stdout
-3.14000010490417
-3.04187510162592
-2.94375009834766
-2.84562509506941
-2.74750009179115
-2.6493750885129
-2.55125008523464
-2.45312508195639
-2.35500007867813
-2.25687507539988
-2.15875007212162
-2.06062506884336
-1.96250006556511
-1.86437506228685
-1.7662500590086
-1.66812505573034
-1.57000005245209
-1.47187504917383
-1.37375004589558
-1.27562504261732
-1.17750003933907
-1.07937503606081
-0.981250032782555
-0.883125029504299
-0.785000026226044
-0.686875022947788
-0.588750019669533
-0.490625016391277
-0.392500013113022
-0.294375009834766
-0.196250006556511
-0.0981250032782555
0
0.0981250032782555
0.196250006556511
0.294375009834766
0.392500013113022
0.490625016391277
0.588750019669533
0.686875022947788
0.785000026226044
0.883125029504299
0.981250032782555
1.07937503606081
1.17750003933907
1.27562504261732
1.37375004589558
1.47187504917383
1.57000005245209
1.66812505573034
1.7662500590086
1.86437506228685
1.96250006556511
2.06062506884336
2.15875007212162
2.25687507539988
2.35500007867813
2.45312508195639
2.55125008523464
2.6493750885129
2.74750009179115
2.84562509506941
2.94375009834766
3.04187510162592
3.14000010490417