Skip to content

Instantly share code, notes, and snippets.

@ekiauhce
Created October 23, 2022 13:54
Show Gist options
  • Save ekiauhce/ab237813e1ea5b5959b494adb29629ec to your computer and use it in GitHub Desktop.
Save ekiauhce/ab237813e1ea5b5959b494adb29629ec to your computer and use it in GitHub Desktop.

Обычный метод, точность корней 2

Initial a:
  2.2400000000   3.4600000000   0.5000000000  -1.4000000000 
 -1.7300000000  -2.6785714286   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0103253623   0.9085796696   0.7970585720   0.9323883959 

Residual c:
 -0.0002459779  -0.0063515244   0.0000000000   0.0000000000 
Part a after calculation:
  2.2400000000   3.4600000000   0.5000000000  -1.4000000000 
  0.0000000000  -0.0063392857   3.5861607143   1.4187500000 
  0.0000000000   0.0000000000 3334.1953722334 1320.3492957747 
  0.0000000000   0.0000000000   0.0000000000  12.2003758927 
Part b after calculation:
  4.5000000000   4.1754464286 3888.6273641851  11.3754889083 

Обычный метод, точность корней 4

Initial a:
  2.2361000000   3.4642000000   0.5000000000  -1.4000000000 
 -1.7321000000  -2.6832431465   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101231775   0.9091703598   0.7982743972   0.9338725688 

Residual c:
 -0.0001217953   0.0000147542   0.0000000000  -0.0000000000 
Part a after calculation:
  2.2361000000   3.4642000000   0.5000000000  -1.4000000000 
  0.0000000000   0.0001524172   3.5873037878   1.4155493940 
  0.0000000000  -0.0000000000 -138963.2426341858 -54833.5922137954 
  0.0000000000  -0.0000000000   0.0000000000  12.1963978075 
Part b after calculation:
  4.5000000000   4.1857340906 -162138.3863546714  11.3898813500 

Обычный метод, точность корней 6

Initial a:
  2.2360680000   3.4641020000   0.5000000000  -1.4000000000 
 -1.7320510000  -2.6832815460   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101373785   0.9091920347   0.7982974166   0.9338703728 

Residual c:
 -0.0000003726   0.0000001698  -0.0000000054   0.0000000153 
Part a after calculation:
  2.2360680000   3.4641020000   0.5000000000  -1.4000000000 
  0.0000000000   0.0000005962   3.5872983738   1.4155645535 
  0.0000000000   0.0000000000 -35523130.8895050883 -14017590.7037297599 
  0.0000000000   0.0000000000   0.0000000000  12.1965659857 
Part b after calculation:
  4.5000000000   4.1856853638 -41448636.2754352763  11.3900116235 

Обычный метод, точность корней 10

Initial a:
  2.2360679775   3.4641016152   0.5000000000  -1.4000000000 
 -1.7320508076  -2.6832815730   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101186391   0.9092022732   0.7982991276   0.9338661209 

Residual c:
 -0.0000000001   0.0000000000   0.0000547328  -0.0002130826 
Part a after calculation:
  2.2360679775   3.4641016152   0.5000000000  -1.4000000000 
  0.0000000000   0.0000000001   3.5872983346   1.4155646630 
  0.0000000000   0.0000000000 -219638302227.2121582031 -86670299004.0521697998 
  0.0000000000   0.0000000000   0.0000000000  12.1966247559 
Part b after calculation:
  4.5000000000   4.1856850116 -256275520973.1829528809  11.3900146484 

Метод с выбором главного, точность корней 2

Initial a:
  2.2400000000   3.4600000000   0.5000000000  -1.4000000000 
 -1.7300000000  -2.6785714286   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0103253623   0.9085796696   0.7970585720   0.9323883959 

Residual c:
 -0.0002459779  -0.0063515244  -0.0000000000   0.0000000000 
Part a after calculation:
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
  0.0000000000   4.9344303797   0.4149367089  -2.2222784810 
  0.0000000000   0.0000000000   3.5866937854   1.4158950285 
  0.0000000000  -0.0000000000   0.0000000000   4.1313708679 
Part b after calculation:
  6.2000000000   2.7420253165   4.1789691213   3.8520422564 

Метод с выбором главного, точность корней 4

Initial a:
  2.2361000000   3.4642000000   0.5000000000  -1.4000000000 
 -1.7321000000  -2.6832431465   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101231775   0.9091703598   0.7982743972   0.9338725688 

Residual c:
 -0.0001217953   0.0000147542   0.0000000000  -0.0000000000 
Part a after calculation:
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
  0.0000000000   4.9360632911   0.4150848101  -2.2208468354 
  0.0000000000   0.0000000000   3.5872909707   1.4156179700 
  0.0000000000   0.0000000000   0.0000000000   4.1293545898 
Part b after calculation:
  6.2000000000   2.7450860759   4.1856493271   3.8562909780 

Метод с выбором главного, точность корней 6

Initial a:
  2.2360680000   3.4641020000   0.5000000000  -1.4000000000 
 -1.7320510000  -2.6832815460   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101373771   0.9091920356   0.7982974166   0.9338703728 

Residual c:
 -0.0000003726   0.0000001698  -0.0000000000  -0.0000000000 
Part a after calculation:
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
  0.0000000000   4.9359442278   0.4150860253  -2.2208350886 
  0.0000000000   0.0000000000   3.5872983236   1.4155648218 
  0.0000000000   0.0000000000   0.0000000000   4.1293332487 
Part b after calculation:
  6.2000000000   2.7451111899   4.1856850322   3.8562619805 

Метод с выбором главного, точность корней 10

Initial a:
  2.2360679775   3.4641016152   0.5000000000  -1.4000000000 
 -1.7320508076  -2.6832815730   3.2000000000   2.5000000000 
 -1.1000000000   4.2000000000  -3.2000000000   0.8000000000 
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
Initial b:
  4.5000000000   0.7000000000   0.9000000000   6.2000000000 

Result x:
  1.0101374249   0.9091920910   0.7982974639   0.9338703370 

Residual c:
 -0.0000000001   0.0000000000   0.0000000000   0.0000000000 
Part a after calculation:
  7.9000000000  -5.2000000000   0.3000000000   2.9000000000 
  0.0000000000   4.9359438282   0.4150860262  -2.2208350803 
  0.0000000000   0.0000000000   3.5872983346   1.4155646631 
  0.0000000000   0.0000000000   0.0000000000   4.1293332223 
Part b after calculation:
  6.2000000000   2.7451112075   4.1856850116   3.8562618077 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment