On Jun 15, 2008, at 3:29 PM, ThoML wrote: > There appears to be another minor complication. If one increases the > size of vals > > vals *= 200 > > one gets an error: `Integer': Infinity (FloatDomainError) Well, to be fair, 1771117911399122021943501576570463920868438730355453249145726540660962310694485994703406981661443989507309617613625154922865835810313868152815318277751521931338734019325348671637367964185869331777657562542031550576686039535823298586722498517733604903356381988668531963257069336339415675144908390480164171374292523565379769479171592421376 is probably outside the scope of the domain of integers considered by Google when setting the problem, but it's an interesting exercise to see how to scale the log sum, do the work, then scale the answers back. It's still O(N) in that case... Dave