VB编程题,牛顿迭代法。
VB编程题,牛顿迭代法。
日期:2017-06-01 15:52:35 人气:1
Private Function NewTon(n As Double, eps As Double) As Double
Dim a(100) As Double
Dim x As Double
Dim y As Double
Dim k As Double
a(0) = 0
For i = 0 To 99
x = a(i)
y = x ^ 3 - 2 * x ^ 2 + 4 * x + 1
k = 3 * x ^ 2 - 4 * x + 4