常用的数值算法的VB程序

源代码在线查看: midpnt.txt

软件大小: 1556 K
上传用户: zwaheron
关键词: 数值算法 VB程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				Sub MIDPNT(A, B, S, N)
				    If N = 1 Then
				        S = (B - A) * FUNC(0.5 * (A + B))
				        IT = 1
				    Else
				        IT = 3 ^ (N - 2)
				        TNM = IT
				        DEL = (B - A) / (3# * TNM)
				        DDEL = DEL + DEL
				        X = A + 0.5 * DEL
				        Sum = 0#
				        For J = 1 To IT
				            Sum = Sum + FUNC(X)
				            X = X + DDEL
				            Sum = Sum + FUNC(X)
				            X = X + DEL
				        Next J
				        S = (S + (B - A) * Sum / TNM) / 3#
				    End If
				End Sub			

相关资源