Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It turns out that treating infinity like it is a number is very convenient (e.g. in convex optimization).

I think these black and white statements are not a good way to explain things. Just start with the set of real numbers. Point out infinity is outside the set. Then introduce the extended reals (R + infinity), with special rules for arithmetic involving +/-infinity. This theoretical convenience extends to the computer when the rules for Inf are implemented correctly. Follow the rules and you might sensibly get an Inf result, break them and you should get a NaN. It's all implemented in IEEE 754. In fact Inf is in your computer but not all the reals are. So there.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: