Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Div by zero musings.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00159730
Message ID:
00159899
Vues:
30
>>OK, any comments on this?
>>
>>I have an app that allows users to enter formulae, and I am trying to capture the results of a Div by 0 before the app tries to store the result.
>>
>>This seems reasonable
>>? (1/0) = (1000/0)
>>.T.
>>
>>So, why is this any different
>>x = (22* 0) / ( 0 * 92)
>>y = (1/0)
>>? x = y
>>.F.
>>
>>Give me a good old Div by zero error any day.
>
>Mathematically speaking, 0/0 not the same as 1/0. The first usually has a "limit," usually 1, the second is infinite. Maybe vfp recognizes the difference...

This is true. Of course, some would argue as to whether zero actually exists. If a tree falls in the forest, does it make a sound? If you have 5 apples and eat one a day for 5 days, how apples do you have? You don't have any apples. But is that the same as having zero apples? Most people say yes. But, do you really HAVE zero apples. Some believe zero is a theory. It doesn't exist. 1000/0 approaches infinity a lot faster than 1/0.

Also, for example, (2/0)/(20/0) approaches 0.1 but VFP reports it as ******** which is (I don't know)???

Just some thoughts...

Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform