반응형

Maclauric Seires for Exp(x)

 

Exp(x)함수를 VBA로 구현하기

 

A Guide to Microsoft Excel 2013 for Scientists and Engineers

 

 

Function MacExp(x)
    Const Precision = 0.000000000000001
    MacExp = 0
    term = 1
    k = 1
    Do While Abs(term) > Precision
        MacExp = MacExp + term
        Debug.Print k; term; MacExp
        term = term * x / k
        k = k + 1
        If k = 100 Then
            MsgBox "Loop aborted, k > 100"
            Exit Do
        End If
    Loop
End Function

 

 

출처 : A Guide to Microsoft Excel 2013 for Scientists and Engineers

반응형

'VBA' 카테고리의 다른 글

RSA Example with Excel  (0) 2022.12.05
하이퍼링크 일괄삭제  (0) 2022.08.04
Excel VBA Dictionary  (0) 2022.06.21
엑셀 VBA 설정  (0) 2022.06.21
Atn함수를 이용하여 Pi계산하기  (0) 2022.04.25

+ Recent posts