Advertisement
Guest User

Untitled

a guest
Nov 10th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 5.85 KB | None | 0 0
  1. --------------------TEST HILBERT---------------------------
  2. For Hilbert Matrix size n = 1:
  3. Rank = 1, cond = 1.0
  4. Gauss error: 0.0
  5. Inverse error: 0.0
  6.  
  7. For Hilbert Matrix size n = 2:
  8. Rank = 2, cond = 19.281470067903967
  9. Gauss error: 5.661048867003676e-16
  10. Inverse error: 1.1240151438116956e-15
  11.  
  12. For Hilbert Matrix size n = 3:
  13. Rank = 3, cond = 524.056777586062
  14. Gauss error: 8.118051169482656e-15
  15. Inverse error: 1.7907430486334138e-14
  16.  
  17. For Hilbert Matrix size n = 4:
  18. Rank = 4, cond = 15513.738738929262
  19. Gauss error: 3.349632515431573e-13
  20. Inverse error: 2.268815452633455e-13
  21.  
  22. For Hilbert Matrix size n = 5:
  23. Rank = 5, cond = 476607.2502421033
  24. Gauss error: 2.8186181571329407e-13
  25. Inverse error: 3.654697861370179e-12
  26.  
  27. For Hilbert Matrix size n = 6:
  28. Rank = 6, cond = 1.495105864172721e7
  29. Gauss error: 2.344229118278564e-10
  30. Inverse error: 2.1526924552188031e-10
  31.  
  32. For Hilbert Matrix size n = 7:
  33. Rank = 7, cond = 4.753673559839011e8
  34. Gauss error: 7.410208490784287e-9
  35. Inverse error: 1.1004084486340423e-8
  36.  
  37. For Hilbert Matrix size n = 8:
  38. Rank = 8, cond = 1.525757550554701e10
  39. Gauss error: 3.736355234341925e-7
  40. Inverse error: 3.044718586687223e-7
  41.  
  42. For Hilbert Matrix size n = 9:
  43. Rank = 9, cond = 4.931538348163301e11
  44. Gauss error: 1.0485260733621061e-5
  45. Inverse error: 5.958958489267314e-6
  46.  
  47. For Hilbert Matrix size n = 10:
  48. Rank = 10, cond = 1.6025337742793652e13
  49. Gauss error: 0.0001902892061817039
  50. Inverse error: 0.00023929944568637062
  51.  
  52. For Hilbert Matrix size n = 11:
  53. Rank = 10, cond = 5.219813567997335e14
  54. Gauss error: 0.004840612082131825
  55. Inverse error: 0.006720407723584139
  56.  
  57. For Hilbert Matrix size n = 12:
  58. Rank = 11, cond = 1.6546640506383568e16
  59. Gauss error: 0.0515312199356675
  60. Inverse error: 0.06988898126789012
  61.  
  62. For Hilbert Matrix size n = 13:
  63. Rank = 11, cond = 2.376786926717726e18
  64. Gauss error: 0.8773261344142039
  65. Inverse error: 1.5119571944035046
  66.  
  67. For Hilbert Matrix size n = 14:
  68. Rank = 11, cond = 2.44167173619644e17
  69. Gauss error: 3.934776094572252
  70. Inverse error: 5.840670521642857
  71.  
  72. For Hilbert Matrix size n = 15:
  73. Rank = 12, cond = 2.4022870188034854e17
  74. Gauss error: 35.372359774035836
  75. Inverse error: 31.13950131676681
  76.  
  77. For Hilbert Matrix size n = 16:
  78. Rank = 12, cond = 7.301849062715712e17
  79. Gauss error: 5.345783450414308
  80. Inverse error: 4.99917180206163
  81.  
  82. For Hilbert Matrix size n = 17:
  83. Rank = 12, cond = 4.7507771590947725e17
  84. Gauss error: 14.381303216697646
  85. Inverse error: 15.299960220214384
  86.  
  87. For Hilbert Matrix size n = 18:
  88. Rank = 12, cond = 1.0621139181205069e18
  89. Gauss error: 5.454180864329791
  90. Inverse error: 6.942728611787584
  91.  
  92. For Hilbert Matrix size n = 19:
  93. Rank = 13, cond = 4.215819618491786e18
  94. Gauss error: 7.007414463759739
  95. Inverse error: 16.272559569359128
  96.  
  97. For Hilbert Matrix size n = 20:
  98. Rank = 13, cond = 2.365121119732083e18
  99. Gauss error: 11.373002753850809
  100. Inverse error: 16.695512931170512
  101.  
  102. --------------------TEST RANDOM----------------------------
  103.  
  104. For n = 5:
  105. +For c = 1.0: For Random Matrix size n = 5:
  106. Rank = 5, cond = 1.0000000000000007
  107. Gauss error: 1.9860273225978183e-16
  108. Inverse error: 1.4043333874306804e-16
  109.  
  110.  
  111. +For c = 10.0: For Random Matrix size n = 5:
  112. Rank = 5, cond = 9.999999999999984
  113. Gauss error: 8.067281120720504e-16
  114. Inverse error: 7.497088734768789e-16
  115.  
  116.  
  117. +For c = 1000.0: For Random Matrix size n = 5:
  118. Rank = 5, cond = 999.9999999999893
  119. Gauss error: 1.4569578196833943e-14
  120. Inverse error: 1.5409959571464003e-14
  121.  
  122.  
  123. +For c = 1.0e7: For Random Matrix size n = 5:
  124. Rank = 5, cond = 9.999999995016571e6
  125. Gauss error: 6.509002890638254e-11
  126. Inverse error: 7.16802786267915e-11
  127.  
  128.  
  129. +For c = 1.0e12: For Random Matrix size n = 5:
  130. Rank = 5, cond = 1.0000667836867411e12
  131. Gauss error: 1.5754201967782774e-5
  132. Inverse error: 1.1473277192184816e-5
  133.  
  134.  
  135. +For c = 1.0e16: For Random Matrix size n = 5:
  136. Rank = 4, cond = 6.684139511958563e15
  137. Gauss error: 0.2889029295986325
  138. Inverse error: 0.36543586339438777
  139.  
  140.  
  141. For n = 10:
  142. +For c = 1.0: For Random Matrix size n = 10:
  143. Rank = 10, cond = 1.0000000000000007
  144. Gauss error: 3.293453726225543e-16
  145. Inverse error: 1.7554167342883504e-16
  146.  
  147.  
  148. +For c = 10.0: For Random Matrix size n = 10:
  149. Rank = 10, cond = 9.999999999999988
  150. Gauss error: 2.8522145930998397e-16
  151. Inverse error: 3.439900227959406e-16
  152.  
  153.  
  154. +For c = 1000.0: For Random Matrix size n = 10:
  155. Rank = 10, cond = 1000.0000000000089
  156. Gauss error: 2.281882411185135e-14
  157. Inverse error: 1.9081016541524968e-14
  158.  
  159.  
  160. +For c = 1.0e7: For Random Matrix size n = 10:
  161. Rank = 10, cond = 9.999999992953647e6
  162. Gauss error: 1.0675497117591031e-10
  163. Inverse error: 9.083790051135667e-11
  164.  
  165.  
  166. +For c = 1.0e12: For Random Matrix size n = 10:
  167. Rank = 10, cond = 1.0000160016557174e12
  168. Gauss error: 9.796100712610881e-6
  169. Inverse error: 1.1734966723427664e-5
  170.  
  171.  
  172. +For c = 1.0e16: For Random Matrix size n = 10:
  173. Rank = 9, cond = 1.0678961887500974e16
  174. Gauss error: 0.30751924637911515
  175. Inverse error: 0.2721239637520368
  176.  
  177.  
  178. For n = 20:
  179. +For c = 1.0: For Random Matrix size n = 20:
  180. Rank = 20, cond = 1.0000000000000007
  181. Gauss error: 4.2494139782533216e-16
  182. Inverse error: 6.392224159095141e-16
  183.  
  184.  
  185. +For c = 10.0: For Random Matrix size n = 20:
  186. Rank = 20, cond = 10.000000000000004
  187. Gauss error: 5.874748045952207e-16
  188. Inverse error: 5.800848902387804e-16
  189.  
  190.  
  191. +For c = 1000.0: For Random Matrix size n = 20:
  192. Rank = 20, cond = 999.9999999999872
  193. Gauss error: 7.431365537108807e-15
  194. Inverse error: 3.874582920122523e-15
  195.  
  196.  
  197. +For c = 1.0e7: For Random Matrix size n = 20:
  198. Rank = 20, cond = 1.0000000000664406e7
  199. Gauss error: 1.1071229293974872e-10
  200. Inverse error: 1.5049099906006415e-10
  201.  
  202.  
  203. +For c = 1.0e12: For Random Matrix size n = 20:
  204. Rank = 20, cond = 9.999686665866554e11
  205. Gauss error: 1.3652012009378222e-5
  206. Inverse error: 1.7112407435987304e-5
  207.  
  208.  
  209. +For c = 1.0e16: For Random Matrix size n = 20:
  210. Rank = 19, cond = 1.9729393524098988e16
  211. Gauss error: 0.02766854560080551
  212. Inverse error: 0.034307645676184245
  213.  
  214.  
  215. Process finished with exit code 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement