Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vb
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Vb
Miscellaneous
Thread ID:
00888435
Message ID:
00888435
Views:
47
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
Map
View

Click here to load this message in the networking platform