|
我是这样的:# u k$ H u, p5 S: e( u# G
Private Function Arccos(x As Double, n As Long)
8 R0 f6 y. _: H% m3 V( ADim i As Long, y As Double
# m, j$ k5 o# ?8 j: Y4 {/ cFor i = 1 To n
0 ]3 R+ _ t# @ y = y + (-1 / Sqr(1 + (x / n * i) ^ 2)) * x / n
& r; g! S0 ~6 DNext
& Y: `4 X' Q1 T5 bArccos = y+ Q; q9 q/ j( F) u
End Function
! y9 @8 \* d/ S$ A; x' L" b, q3 f5 ~! |4 U
用的是Arccos的微分来算近似值,怎么不对?
$ `; E; p3 a3 W# l9 w# t- D |
|