VB常用数值算法集 内含有解线性代数方程组

源代码在线查看: gcf.txt

软件大小: 1879 K
上传用户: whyzhao
关键词: 数值算法 解线性 方程
下载地址: 免注册下载 普通下载 VIP

相关代码

				Sub GCF(GAMMCF, A, X, GLN)
				    ITMAX = 100
				    EPS = 0.0000003
				    GLN = GAMMLN(A)
				    GOLD = 0#
				    A0 = 1#
				    A1 = X
				    B0 = 0#
				    B1 = 1#
				    FAC = 1#
				    For N = 1 To ITMAX
				        AN = N
				        ANA = AN - A
				        A0 = (A1 + A0 * ANA) * FAC
				        B0 = (B1 + B0 * ANA) * FAC
				        ANF = AN * FAC
				        A1 = X * A0 + ANF * A1
				        B1 = X * B0 + ANF * B1
				        If A1  0# Then
				            FAC = 1# / A1
				            G = B1 * FAC
				            If Abs((G - GOLD) / G) < EPS Then GoTo 1
				            GOLD = G
				        End If
				    Next N
				    Print "A too large, ITMAX too small"
				1   GAMMCF = Exp(-X + A * Log(X) - GLN) * G
				End Sub			

相关资源