Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Upvoted. While you were posting this, I was writing very similar code (see my answer). Commented Jan 23, 2014 at 16:19
  • One issue I see (I guess there are issues in my post as well!) is that the sum of say 2,000,000,000 and 2,000,000,000 will "wrap-around" to a negative result. I would expect PositiveInfinity in that case. Commented Jan 23, 2014 at 16:23