News for hackers. Stuff that matters.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by haberman on Friday January 06, 2012 @04:55PM (#3435217)
Yeah, for large cases the long will overflow (also it will do a lot of realloc()). Your two main options for this are:

  1. use double to get approximately-correct answers
  2. use an abitrary-precision library like GMP
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by zyzzy on Friday January 06, 2012 @05:51PM (#3435448)
What if I wanted an exact precision. Could I use a custom data type to get better precision? If I used a custom data type, how could I make the code work for a distributed system to get parallel behavior?