Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Algorith of fixed point
Message
From
11/04/2004 09:31:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/04/2004 05:48:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00893895
Message ID:
00893905
Views:
27
So, which part are you missing?

The absolute value, you can get with abs().

You assign variables just like you wrote in your pseudocode.

To repeat commands, you can use several alternatives; the most appropriate in this case seems DO WHILE.

Quick input can be done with ACCEPT or INPUT, but in general, input is best done with TextBoxes and other objects on a form.

Part of your desired code might look like this:
...
i = 1
p = g(p0)
do while i <= n and abs(p-p0) < SmallNumber
  i = i + 1
  p = g(p)
enddo
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform