Advertisement
cmiN

nat-3-p2.c

Sep 18th, 2020
1,728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.78 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. #define EPS 0.000000001  // epsilon
  5.  
  6.  
  7. void e_putere() {
  8.     int col = 0;
  9.  
  10.     for (double x = 0.0; ; x += 0.5) {
  11.         printf("%.6lf ", exp(x));
  12.         if (++col % 1 == 0) printf("\n");
  13.  
  14.         if (fabs(x - 40.0) < EPS) break;
  15.     }
  16. }
  17.  
  18.  
  19. int main() {
  20.     e_putere();
  21.  
  22.     return 0;
  23. }
  24.  
  25.  
  26. 1.000000
  27. 1.648721
  28. 2.718282
  29. 4.481689
  30. 7.389056
  31. 12.182494
  32. 20.085537
  33. 33.115452
  34. 54.598150
  35. 90.017131
  36. 148.413159
  37. 244.691932
  38. 403.428793
  39. 665.141633
  40. 1096.633158
  41. 1808.042414
  42. 2980.957987
  43. 4914.768840
  44. 8103.083928
  45. 13359.726830
  46. 22026.465795
  47. 36315.502674
  48. 59874.141715
  49. 98715.771011
  50. 162754.791419
  51. 268337.286521
  52. 442413.392009
  53. 729416.369848
  54. 1202604.284165
  55. 1982759.263538
  56. 3269017.372472
  57. 5389698.476283
  58. 8886110.520508
  59. 14650719.428954
  60. 24154952.753575
  61. 39824784.397576
  62. 65659969.137331
  63. 108254987.750231
  64. 178482300.963187
  65. 294267566.041509
  66. 485165195.409790
  67. 799902177.475505
  68. 1318815734.483215
  69. 2174359553.576488
  70. 3584912846.131592
  71. 5910522063.023291
  72. 9744803446.248903
  73. 16066464720.622478
  74. 26489122129.843472
  75. 43673179097.646416
  76. 72004899337.385880
  77. 118716009132.169647
  78. 195729609428.838776
  79. 322703570371.154846
  80. 532048240601.798645
  81. 877199251318.764893
  82. 1446257064291.475098
  83. 2384474784797.677734
  84. 3931334297144.041992
  85. 6481674477934.320312
  86. 10686474581524.462891
  87. 17619017951355.632812
  88. 29048849665247.425781
  89. 47893456332463.726562
  90. 78962960182680.687500
  91. 130187912050632.937500
  92. 214643579785916.062500
  93. 353887435612259.875000
  94. 583461742527454.875000
  95. 961965785544776.375000
  96. 1586013452313430.750000
  97. 2614894114445696.500000
  98. 4311231547115195.000000
  99. 7108019154642244.000000
  100. 11719142372802612.000000
  101. 19321599304402836.000000
  102. 31855931757113756.000000
  103. 52521552285925160.000000
  104. 86593400423993744.000000
  105. 142768381181291984.000000
  106. 235385266837020000.000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement