|
我是这样的:2 p0 _5 p$ w# F
Private Function Arccos(x As Double, n As Long)
) h# y* s8 Z. {1 w5 zDim i As Long, y As Double
" n; W* x7 F- Y; Q( Y9 EFor i = 1 To n
, h0 D- Y% b3 f+ [2 \" [/ T y = y + (-1 / Sqr(1 + (x / n * i) ^ 2)) * x / n2 F- {1 A+ q \/ W, ]& y8 L- P
Next! X5 o" y9 d3 D
Arccos = y
, f! i( R2 I' k& n$ V9 }6 f! T7 |End Function7 v& J+ u+ m3 k, j
( h7 y5 {! e! Z- [7 _用的是Arccos的微分来算近似值,怎么不对?9 X$ G% t; R$ i; h4 N2 p/ n) z
|
|