Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Division by zero in .NET
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01320485
Message ID:
01320527
Vues:
17
>>It's ridiculous anyway. In any type of math, division by zero is not supposed to be 'infinity', it's supposed to be 'undefined'. But you're right, infinity should be outside the range of double and float, but they have special values of positive infinity and negative infinity. I have no good idea why. 5/0 gives positive infinity. -5/0 gives negative infinity.
>
>http://en.wikipedia.org/wiki/Divide_by_zero

A pretty good writeup, but unfortunately, it never really explains the need for computers to calculate 1/0 = positive infinity and -1/0 = negative infinity. In fact, he even says that most computer programs, even though it's allowed, return an error condition because of the algebraic inconsitencies if you try to divide by zero.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform