Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why does dividing neg # by 0 return *******
Message
De
27/06/2002 20:44:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
27/06/2002 15:59:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00673060
Message ID:
00673137
Vues:
13
>Any positive number divided by zero is +infinity (numeric overflow, or row of **** as you saw).
>Any negative number divided by zero is -infinity
>0/0 is undefined.

For practical purposes, the result can often be considered as infinity. In "pure mathematics", the result is said to be undefine.

For Keith: an explanation of why is this undefined.

Division is the inverse operation of multiplication.

For example, x = 5 / 2 means: "what number satisfies the equation 2 * x = 5?" (answer: 2.5).

x = 1 / 0 means: "what number satisfies the equiation 0 * x = 1?" Answer: no number will fit here, because any number times 0 equals 0. Therefore, the division is undefined.

Now, how do we get the "infinity"? By a process of limits.
1 / 1 = 1
1 / 0.1 = 10
1 / 0.0001 = 10000
1 / 0.000001 = 1000000
...
As you see, when the denominator approaches zero, the result gets bigger and bigger, beyond any bound.

Hilmar.
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