```0-23 degrees, step 1 minute, inc for polynomial 3 degrees
calling GAUSEL.BAS
return from GAUSEL.BAS
ierr =  0.000000000000001
b array
x^0 -0.00000 00000 00921 82054 55732 92117
x^1 +0.01745 32925 21528 43918 91338 99178
x^2 -0.00000 00000 00852 34425 87568 13625
x^3 -0.00000 08860 95938 85989 37844 33629
x^4 -0.00000 00000 00030 09811 54302 63609
x^5 +0.00000 00000 13498 39580 15480 39898
x^6 -0.00000 00000 00000 10351 55864 71165
x^7 -0.00000 00000 00000 09584 21316 86412
input values
minutes   sin value
0 	-0.00000 00000 00921 82054 55732 92117
1 	+0.00029 08882 03667 78734 70812 51813
2 	+0.00058 17763 83643 14612 39640 08292
3 	+0.00087 26645 14390 48222 58835 61988
4 	+0.00116 35525 71296 02620 40790 41698
5 	+0.00145 44405 29746 01480 33013 23351
6 	+0.00174 53283 65126 69304 48921 17883
7 	+0.00203 62160 52824 31630 98607 71427
differences, in human readable form
0  -0.00000 00000 00921 82054 55732 92117
1  +0.00029 08882 04589 60789 26545 43931
2  -0.00000 00000 24614 24911 57717 87452
3  -0.00000 00000 24613 77355 91914 15330
4  +0.00000 00000 00000 00411 04305 44127
5  +0.00000 00000 00000 00208 30812 03004
6  -0.00000 00000 00000 00000 00021 15129
7  -0.00000 00000 00000 00000 00001 72555
differences, in Babbage useable form (10's compliment)
0   0.99999 99999 99078 17945 44267 07883
1   0.00029 08882 04589 60789 26545 43931
2   0.99999 99999 75385 75088 42282 12548
3   0.99999 99999 75386 22644 08085 84670
4   0.00000 00000 00000 00411 04305 44127
5   0.00000 00000 00000 00208 30812 03004
6   0.99999 99999 99999 99999 99978 84871
7   0.99999 99999 99999 99999 99998 27445

output
degrees  sin of degree                                error
0  0 	-0.00000 00000 00921 82054 55732 92117 	-0.00000 00000 00921 82054 55732 92117
0  1 	+0.00029 08882 03667 78734 70812 51813 	-0.00000 00000 00895 63724 92930 45601
0  2 	+0.00058 17763 83643 14612 39640 08292 	-0.00000 00000 00869 92148 66503 86921
0  3 	+0.00087 26645 14390 48222 58835 61988 	-0.00000 00000 00844 66731 74210 27310
0  4 	+0.00116 35525 71296 02620 40790 41698 	-0.00000 00000 00819 86885 63869 48684
0  5 	+0.00145 44405 29746 01480 33013 23351 	-0.00000 00000 00795 52027 29731 67465
0  6 	+0.00174 53283 65126 69304 48921 17883 	-0.00000 00000 00771 61579 08860 84836
0  7 	+0.00203 62160 52824 31630 98607 71427 	-0.00000 00000 00748 14968 77534 19765
0  8 	+0.00232 71035 68225 15242 19586 05263 	-0.00000 00000 00725 11629 47657 21103
0  9 	+0.00261 79908 86715 48373 07506 22973 	-0.00000 00000 00702 50999 63194 55097
0  10 	+0.00290 88779 83681 60919 46844 12246 	-0.00000 00000 00680 32522 96616 64635
0  11 	+0.00319 97648 34509 84646 41560 68778 	-0.00000 00000 00658 55648 45361 96546
0  12 	+0.00349 06514 14586 53396 45729 69712 	-0.00000 00000 00637 19830 28314 93280
0  13 	+0.00378 15376 99298 03297 94132 24063 	-0.00000 00000 00616 24527 82299 45295
0  14 	+0.00407 24236 64030 72973 32816 27573 	-0.00000 00000 00595 69205 58588 00475
0  15 	+0.00436 33092 84171 03747 49619 49441 	-0.00000 00000 00575 53333 19426 26903
0  16 	+0.00465 41945 35105 39856 04653 78373 	-0.00000 00000 00555 76385 34573 25307
0  17 	+0.00494 50793 92220 28653 60749 55397 	-0.00000 00000 00536 37841 77856 87523
0  18 	+0.00523 59638 30902 20822 13858 20888 	-0.00000 00000 00517 37187 23744 97277
0  19 	+0.00552 68478 26537 70579 23411 03248 	-0.00000 00000 00498 73911 43931 69630
0  20 	+0.00581 77313 54513 35886 42632 76686 	-0.00000 00000 00480 47509 03939 25401
0  21 	+0.00610 86143 90215 78657 48808 15543 	-0.00000 00000 00462 57479 59734 96900
0  22 	+0.00639 94969 09031 64966 73499 72607 	-0.00000 00000 00445 03327 54363 61295
0  23 	+0.00669 03788 86347 65257 32715 08863 	-0.00000 00000 00427 84562 14594 97936
0  24 	+0.00698 12602 97550 54549 57022 02123 	-0.00000 00000 00411 00697 47586 65974
0  25 	+0.00727 21411 18027 12649 21609 61981 	-0.00000 00000 00394 51252 37561 98588
0  26 	+0.00756 30213 23164 24355 76293 78538 	-0.00000 00000 00378 35750 42503 10155
0  27 	+0.00785 39008 88348 79670 75465 32342 	-0.00000 00000 00362 53719 90859 12701
0  28 	+0.00814 47797 88967 74006 07978 92988 	-0.00000 00000 00347 04693 78269 37931
0  29 	+0.00843 56580 00408 08392 26981 33823 	-0.00000 00000 00331 88209 64301 61208
0  30 	+0.00872 65354 98056 89686 79676 90201 	-0.00000 00000 00317 03809 69205 23771
0  31 	+0.00901 74122 57301 30782 37028 88733 	-0.00000 00000 00302 51040 70679 49550
0  32 	+0.00930 82882 53528 50815 23394 74977 	-0.00000 00000 00288 29454 00656 52889
0  33 	+0.00959 91634 62125 75373 46093 67013 	-0.00000 00000 00274 38605 42099 33523
0  34 	+0.00989 00378 58480 36705 24904 62348 	-0.00000 00000 00260 78055 25814 55125
0  35 	+0.01018 09114 17979 73927 21493 25596 	-0.00000 00000 00247 47368 27280 03760
0  36 	+0.01047 17841 16011 33232 68765 84378 	-0.00000 00000 00234 46113 63487 22588
0  37 	+0.01076 26559 27962 68100 00148 60887 	-0.00000 00000 00221 73864 89798 19125
0  38 	+0.01105 35268 29221 39500 78790 66563 	-0.00000 00000 00209 30199 96817 41424
0  39 	+0.01134 43967 95175 16108 26688 87323 	-0.00000 00000 00197 14701 07278 19477
0  40 	+0.01163 52658 01211 74505 53732 86791 	-0.00000 00000 00185 26954 72943 68202
0  41 	+0.01192 61338 22718 99393 86668 54973 	-0.00000 00000 00173 66551 71522 48329
0  42 	+0.01221 70008 35084 83800 97978 29822 	-0.00000 00000 00162 33087 03598 81525
0  43 	+0.01250 78668 13697 29289 34676 19138 	-0.00000 00000 00151 26159 89577 16101
0  44 	+0.01279 87317 33944 46164 47016 50248 	-0.00000 00000 00140 45373 66641 39626
0  45 	+0.01308 95955 71214 53683 17113 74911 	-0.00000 00000 00129 90335 85728 34790
0  46 	+0.01338 04583 00895 80261 87472 56893 	-0.00000 00000 00119 60658 08515 74854
0  47 	+0.01367 13198 98376 63684 89425 69657 	-0.00000 00000 00109 55956 04424 55023
0  48 	+0.01396 21803 39045 51312 71478 31613 	-0.00000 00000 00099 75849 47635 56082
0  49 	+0.01425 30395 98291 00290 27557 06373 	-0.00000 00000 00090 19962 14120 36634
0  50 	+0.01454 38976 51501 77755 25161 95456 	-0.00000 00000 00080 87921 78686 50276
0  51 	+0.01483 47544 74066 61046 33419 50888 	-0.00000 00000 00071 79360 12036 84060
0  52 	+0.01512 56100 41374 37911 51035 35142 	-0.00000 00000 00062 93912 77843 14578
0  53 	+0.01541 64643 28814 06716 34144 55863 	-0.00000 00000 00054 31219 29833 78011
0  54 	+0.01570 73173 11774 76652 24058 02823 	-0.00000 00000 00045 90923 08895 50485
0  55 	+0.01599 81689 65645 67944 74903 14551 	-0.00000 00000 00037 72671 40189 35081
0  56 	+0.01628 90192 65816 12061 81157 02083 	-0.00000 00000 00029 76115 30280 51838
0  57 	+0.01657 98681 87675 51922 05070 57277 	-0.00000 00000 00022 00909 64282 27105
0  58 	+0.01687 07157 06613 42103 03981 73138 	-0.00000 00000 00014 46713 03013 78568
0  59 	+0.01716 15617 98019 49049 57516 03598 	-0.00000 00000 00007 13187 80171 92322

1  0 	+0.01745 24064 37283 51281 94672 90196 	+0.00000 00000 00000 00000 00483 11680
2  0 	+0.03489 94967 02663 00467 14735 80211 	+0.00000 00000 00162 03302 54783 98586
3  0 	+0.05233 59562 43030 34462 50280 01926 	+0.00000 00000 00086 51190 29093 72317
4  0 	+0.06975 64737 44125 30275 67264 99341 	+0.00000 00000 00000 00198 07676 64147
5  0 	+0.08715 57427 47624 75226 27865 36456 	-0.00000 00000 00033 42129 52777 34380
6  0 	+0.10452 84632 67630 03009 52150 97271 	-0.00000 00000 00023 44130 46190 57530
7  0 	+0.12186 93434 05147 59201 17366 85786 	+0.00000 00000 00000 11089 88427 66555
8  0 	+0.13917 31009 60079 91847 46813 26001 	+0.00000 00000 00014 47436 21846 62700
9  0 	+0.15643 44650 40243 62783 40325 61916 	+0.00000 00000 00012 75882 39272 42449
10  0 	+0.17364 81776 66931 75322 98354 57531 	+0.00000 00000 00001 40437 81188 30762
11  0 	+0.19080 89953 76537 13964 91645 96846 	-0.00000 00000 00007 67275 59758 91111
12  0 	+0.20791 16908 17753 91757 28520 83861 	-0.00000 00000 00005 41952 88902 00543
13  0 	+0.22495 10543 43874 00964 71755 42576 	+0.00000 00000 00009 01159 60683 34234
14  0 	+0.24192 18955 99695 62681 57061 16991 	+0.00000 00000 00027 90425 52637 42891
15  0 	+0.25881 90451 02560 71034 65164 71106 	+0.00000 00000 00039 94799 76176 33482
16  0 	+0.27563 73558 17038 27618 99487 88921 	+0.00000 00000 00039 09053 99772 14310
17  0 	+0.29237 17047 22770 61810 21427 74436 	+0.00000 00000 00033 89000 46740 79059
18  0 	+0.30901 69943 74999 32596 95236 51651 	+0.00000 00000 00051 90186 72302 34469
19  0 	+0.32556 81544 57288 07576 94501 64566 	+0.00000 00000 00131 40705 54412 28772
20  0 	+0.34202 01433 25959 14760 22225 77181 	+0.00000 00000 00290 41455 81229 62499
21  0 	+0.35836 79495 45760 62822 96506 73496 	+0.00000 00000 00460 35474 55128 84083
22  0 	+0.37460 65934 16281 25455 53817 57511 	+0.00000 00000 00369 21914 04179 83010
23  0 	+0.39073 11284 88629 85448 21886 53226 	-0.00000 00000 00643 90057 98959 35662
********* end of range of polynomial **************
- following just to see what happens -
24  0 	+0.40673 66430 71896 34158 14177 04641 	-0.00000 00000 03903 86617 25682 85699
25  0 	+0.42261 82617 28911 22000 97967 75756 	-0.00000 00000 11788 21617 71817 13890
26  0 	+0.43837 11467 60820 55610 88032 50571 	-0.00000 00000 28256 86134 39312 90086
27  0 	+0.45399 04996 79993 37312 17920 33086 	-0.00000 00000 59553 41843 86163 33270
28  0 	+0.46947 15626 70778 42546 40835 47301 	-0.00000 00001 15112 35049 53787 40925
29  0 	+0.48480 96200 37627 30898 12117 37216 	-0.00000 00002 08709 72009 41678 85198
30  0 	+0.49999 99996 40100 86363 05320 66831 	-0.00000 00003 59899 13636 94679 33168
31  0 	+0.51503 80743 14275 82502 13895 20146 	-0.00000 00005 95778 38506 02424 16251
32  0 	+0.52991 92632 80068 68124 90466 01161 	-0.00000 00009 53136 27279 77345 50654
33  0 	+0.54463 90335 33993 69145 75713 33876 	-0.00000 00014 81033 39076 65123 58204
34  0 	+0.55919 29012 26872 02256 68852 62291 	-0.00000 00022 43874 80759 35428 77693
35  0 	+0.57357 64330 26008 96059 91714 50406 	-0.00000 00033 25037 13550 88604 62419
36  0 	+0.58778 52474 61356 15303 98424 82221 	-0.00000 00048 31116 97612 88634 72417
37  0 	+0.60181 50162 55175 83866 82684 61736 	-0.00000 00068 96872 44124 97085 38704
38  0 	+0.61566 14656 34724 02129 34650 12951 	-0.00000 00096 90934 25837 53460 79891
39  0 	+0.62932 03776 27469 54382 99412 79866 	-0.00000 00134 22367 90887 59611 78412
40  0 	+0.64278 75913 38366 01914 89079 26481 	-0.00000 00183 48173 30717 37354 83425
41  0 	+0.65605 90042 08693 57414 00451 36796 	-0.00000 00247 81813 71064 24508 27226
42  0 	+0.66913 05732 55987 36341 90306 14811 	-0.00000 00331 02870 85040 72427 15874
43  0 	+0.68199 83162 94569 80911 60275 84526 	-0.00000 00437 67928 69132 61982 00184
44  0 	+0.69465 83131 36203 52318 03327 89941 	-0.00000 00573 22793 76347 60735 09480
45  0 	+0.70710 67067 70381 86863 63844 95056 	-0.00000 00744 16165 65576 44598 67047

10    word 30
20   point 15
30   kill "what3.txt"
40   print=print+"what3.txt"
50   ' file ub-g-el.bas     - UBASIC Gaussian Elimination
60   '
70   '
80   print "0-23 degrees, step 1 minute, inc for polynomial 3 degrees"
90   dim A(10,10) ' INPUT MATRIX OF COEFFICIENTS (DESTROYED) - shared
100   dim B(10,1) ' B(MAX,NR) - MATRIX OF CONSTANTS (REPLACED BY SOLUTIONS) - shar
110   dim Y(10) ' y values from computing poly
120   dim W(10) ' working values in babbage
130   dim Stepval(10) '
140
150   Max%=8 ' set size of power array
160   N%=8
170   Nr%=1 ' set size of result array
180   Ierr=1.0*10^(-15)
190   '
200
210   ' set up a and b arrays with sin -1 to 20 step 3
230   for I=1 to 8
240   Deg=(I*3)-2
260   B(I,1)=Y ' sets up value array
270   A(I,1)=1:W=1 ' x^0
280   for J=2 to 8
290   W=Deg*W ' makes power of x
300   A(I,J)=W ' sets into array
310   next J
320   next I
330   '
340   print "calling GAUSEL.BAS"
350   gosub *Gausel(Max%,N%,Nr%,Ierr)
360   print "return from GAUSEL.BAS"
370   print "ierr = ";Ierr
380
390   print "b array"
400   for I%=1 to N%
410   J%=1
420   print "x^";chr(48+I%-1);" "; 'I%
430     gosub *Sprint(B(I%,J%))
440   print
450   next I%
460
465   '     0123456789012345678901234567890
466   Ten30=1000000000000000000000000000000
470   ' calc y for steps 1
472   print "input values"
474   print " minutes   sin value"
480    for I%=0 to 7
481       Deg=(I%)/60 ' start at 0 minute
482       T=1:WS=0
484       for J%=1 to 8
486         WS=WS+T*B(J%,1)
488         T=T*Deg
489       next J%
490       Stepval(I%)=WS
492       WS=int(WS*Ten30)/Ten30
494       Stepval(I%)=WS
495       print I%,:gosub *Sprint(Stepval(I%)):print
500    next I%
510   '
520   print " differences"
530   for N%=0 to 7
540   W(N%)=Stepval(0):print N%;" "; gosub *Sprint(W(N%)):print
550    for I%=0 to (7-N%)
560   Stepval(I%)=Stepval(I%+1)-Stepval(I%)
570   next I%
580   next N%
590   '
600   ' run the machine
610   print "output"
620   print "degrees  sin of degree                                error"
630   for Deg%=0 to 45
635   for Min%=0 to 59
636   if ((Deg%<>0) and (Min%<>0)) then goto *Skipprint
640   print Deg%;Min%,
650   gosub *Sprint(W(0)):print,
670   gosub *Sprint(E):print
672   *Skipprint
680   for I%=0 to 6
690   W(I%)=W(I%)+W(I%+1)
700   next I%
705   next Min%
710   next Deg%
720   print=print
730   stop
740   '----------- subroutine gausel ---------------------
750   ' converted to BASIC from http://www.netlib.org/ieeecss/cascade/gausel.frun
760
770   *Gausel(Max%,N%,Nr%,Ierr)
780   '      SUBROUTINE GAUSEL (MAX, N, A, NR, B, IERR)
790   '   FUNCTION              - COMPUTES SOLUTION TO A SET OF SIMULTANEOUS
800   '                             LINEAR EQUATIONS (DOES NOT GIVE PIVOT OR
810   '                             DETERMINANT DATA)
820   '   PARAMETERS  MAX       - MAXIMUM ROW DIMENSION OF B
830   '               N         - ORDER OF A
840   '               A(N,N)    - INPUT MATRIX OF COEFFICIENTS (DESTROYED)
850   '               NR        - NUMBER OF COLUMNS IN B
860   '               B(MAX,NR) - MATRIX OF CONSTANTS (REPLACED BY SOLUTIONS)
870   '               IERR      - INTEGER ERROR CODE
880   '                             = 0   NORMAL RETURN
890   '                             = 5   INPUT MATRIX IS SINGULAR
900   '   REQUIRED SUBPROGRAMS  - NONE
910   '   REQUIRED FUNCTIONS    - DABS
920   '   AUTHOR/IMPLEMENTER    - R.C. WARD / R.C. WARD
930   '   LANGUAGE              - FORTRAN (IBM DOUBLE PRECISION)
940   '      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
950   '      DIMENSION A(N,N),B(MAX,NR)
960   ' input
970   'DIM A(10,10)     ' INPUT MATRIX OF COEFFICIENTS (DESTROYED)
980   'DIM B(10,1)  ' B(MAX,NR) - MATRIX OF CONSTANTS (REPLACED BY SOLUTIONS)
990   ' MAX       - MAXIMUM ROW DIMENSION OF B
1000   ' N         - ORDER OF A
1010   ' NR        - NUMBER OF COLUMNS IN B
1020   ' IERR      - INTEGER ERROR CODE
1030   '           = 0   NORMAL RETURN
1040   '           = 5   INPUT MATRIX IS SINGULAR
1050
1060   NM1%=N%-1
1070   if (NM1%=0) goto *Line140
1080   ' ****
1090   '     FIND LARGEST REMAINING ELEMENT IN I-TH COLUMN FOR PIVOT
1100   ' ****
1110   for I%=1 to NM1%
1120   BIG=0.0
1130   for K%=I% to N%
1140     TERM=abs(A(K%,I%))
1150     if (TERM>BIG) then
1160       BIG=TERM
1170       L%=K%
1180     endif
1190   next K%
1200   if (BIG=0) then goto *Line160
1210   if (I%<>L%) then
1220   ' ****
1230   '     PIVOT ROWS OF A AND B
1240   ' ****
1250      for J%=1 to N%
1260        TEMP=A(I%,J%)
1270        A(I%,J%)=A(L%,J%)
1280        A(L%,J%)=TEMP
1290      next J%
1300      for J%=1 to Nr%
1310        TEMP=B(I%,J%)
1320        B(I%,J%)=B(L%,J%)
1330        B(L%,J%)=TEMP
1340      next J%
1350   endif
1360   ' ****
1370   '     STORE PIVOT AND PERFORM COLUMN OPERATIONS ON A AND B
1380   ' ****
1390   IP1%=I%+1
1400   for II%=IP1% to N%
1410     A(II%,I%)=A(II%,I%)/A(I%,I%)
1420     X3=A(II%,I%)
1430     for K%=IP1% to N%
1440       A(II%,K%)=A(II%,K%)-X3*A(I%,K%)
1450     next K%
1460     for K%=1 to Nr%
1470       B(II%,K%)=B(II%,K%)-X3*B(I%,K%)
1480    next K%
1490   next II%
1500   *Line100
1510   next I%
1520   ' 100  CONTINUE
1530   ' ****
1540   '     PERFORM BACK SUBSTITUTION
1550   ' ****
1560   for IC%=1 to Nr%
1570   B(N%,IC%)=B(N%,IC%)/A(N%,N%)
1580   next IC%
1590   for KK%=1 to NM1%
1600   I%=N%-KK%
1610   IP1%=I%+1
1620   for J%=1 to Nr%
1630     SUM=B(I%,J%)
1640     for K%=IP1% to N%
1650       SUM=SUM-A(I%,K%)*B(K%,J%)
1660     next K%
1670     B(I%,J%)=SUM/A(I%,I%)
1680   next J%
1690   next KK%
1700   goto *Line170
1710   *Line140
1720   if (A(1,1)=0) goto *Line160
1730   for J%=1 to Nr%
1740     B(1,J%)=B(1,J%)/A(1,1)
1750   next J
1760
1770   goto *Line170
1780   *Line160
1790   Ierr=5
1800   *Line170
1810        return
1820      ' END
1830   end Sub
1840
1850   *Sprint(A)
1860   local I,J,K,Delta
1870   ' pretty print
1880   '       1234567890123456789012345678901234567890
1890   Delta=0.0000000000000000000000000000000000000001
1900   if (int(A)<>int(A+Delta)) then A=A+Delta
1910   if A>=0 then print "+";:else print "-";:endif
1920   A=abs(A)
1930   if Int (A)>9 then print "*** overflow ***":return:endif
1940   print chr(48+int(A));:print ".";
1950   for I=1 to 30
1960   A=(A-int(A))*10 ' strip integer part, mpy
1970   print chr(48+int(A));
1980   if ((I/5)=int(I/5)) and (I<>35) then print " ";
1990   next I
2000   return
2010   stop
```