Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compute The Percentage of Change
Message
De
13/12/2006 18:53:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01177440
Message ID:
01177445
Vues:
15
>How do you compute the percentage of change between two values?
b / a - 1
Note that the percentage changes when you switch a and b. For instance, an increase by 25% must be offset by a decrease of 20% to get back to the original value.

The above formula can be derived from the following:
(b - a) / a && Difference divided by one of the variables
by the use of the distributive law. But I prefer to use every variable only once.

If you want the values expressed in percent (i.e., per hundred), you must multiply the result by 100 in each case.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform