Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0025/numint.bas
There are 2 other files named numint.bas in the archive. Click here to see a list.
00005	FOR I=1 TO 5
00006	READ U(I),R(I)
00007	NEXT I
00008	LET X=LOG(99)
00009	LET J=3
00010	GOTO 39
00011	IF J=1 THEN 26
00012	IF J=2 THEN 30
00013	PRINT
00014	PRINT "LIMITS (LOWER,UPPER) = ";
00015	INPUT A,B
00016	IF A=B THEN 99
00017	LET C1=0.5*(B+A)
00018	LET C2=B-A
00019	LET S=0
00020	LET I=0
00021	LET I=I+1
00022	LET W=C2*U(I)
00023	LET X=C1+W
00024	LET J=1
00025	GOTO 10
00026	LET S=S+R(I)*Y
00027	LET X=C1-W
00028	LET J=2
00029	GOTO 10
00030	LET S=S+R(I)*Y
00031	IF I<5 THEN 21
00032	PRINT
00033	PRINT "   INTEGRAL = ";S*C2
00034	PRINT
00035	GOTO 13
00036	DATA 74437169E-9,14776211E-8,21669769E-8,13463336E-8
00037	DATA 33970478E-8,10954318E-8,43253168E-8,74725674E-9
00038	DATA 48695326E-8,33356722E-9
00039	PRINT
00040	PRINT "THIS PROGRAM EVALUATES DEFINITE INTEGRALS USING"
00041	PRINT "GAUSS' RULE WITH TEN POINTS.   TO USE, ENTER THE"
00042	PRINT "FUNCTION TO BE INTEGRATED AS:"
00043	PRINT
00044	PRINT "      10  LET Y =  <A FUNCTION OF X>"
00045	PRINT
00046	PRINT "THEN TYPE 'RUN'.   THE PROGRAM WILL ASK FOR THE"
00047	PRINT "INTEGRATION LIMITS AS IT RUNS.   IF MORE THAN ONE"
00048	PRINT "INTEGRAL OF THE SAME FUNCTION IS TO BE EVALUATED,"
00049	PRINT "JUST KEEP SUPPLYING LIMITS.   TO STOP THE PROGRAM,"
00050	PRINT "MAKE THE TWO LIMITS EQUAL TO EACH OTHER."
00099	END