Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Division by zero in .NET
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01320485
Message ID:
01320527
Views:
16
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform