Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Algorith of fixed point
Message
De
11/04/2004 09:31:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/04/2004 05:48:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00893895
Message ID:
00893905
Vues:
25
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform