All pastes #343044 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-06 19:16 UTC
rendered paste body
Function newt(ByVal x As Double) As Double

    Dim c As Double
    Dim a As Double
    Dim xn As Double
    Dim d As Double
    Dim b As Double
    xn = x
    c = ((xn) - ((Tan(xn) - (xn) - t) / ((1 / Cos(xn)) ^ 2 - 1)))
    
    a = c
    xn = c
    d = ((xn) - ((Tan(xn) - (xn) - t) / ((1 / Cos(xn)) ^ 2 - 1)))
    b = d
    xn = d
    
    If a = b Then
        newt = xn
    ElseIf a <> b Then
        newt = newt(xn)
    End If
    
    
End Function