All pastes #168251 Raw Edit

martynas

public text v1 · immutable
·published 2006-09-12 20:56 UTC
rendered paste body
sub .......
...........
a = 0.0001
b = 1
1 x = F(a)
 y = F(b)
If (x * y) > 0 Then
Cells(1, 2) = "nera saknu"
GoTo 2
End If
c = a - (b - a) * x / (y - x)
If (Abs(F(c)) < 0.001) Then
Cells(1, 1) = c
GoTo 2
End If
If F(a) * F(c) > 0 Then
a = c
Else: b = c
End If
GoTo 1
2 end sub