Hello.
I want to change this code from vfp to vb(code and form) ,if you can help
thank you.
a = SomeInitialValueGoesHere && whatever your appropriate values are
b = ???
lnEpsilon = 0.0003
for i = 1 to 5
p = ( a + b ) / 2
if ( FuncX( a ) * FuncX( b ) < 0.0 )
b = p
else
a = p
if ( abs( b - a ) <= lnEpsilon )
? p
exit && leaves for loop
endif
endif
endfor
function FuncX( lnArg )
return cos( lnArg ) - 2.0 * lnArg ^ 3 - 0.5
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only