[CSC 330] How big?

Andrew J. Pounds pounds_aj at mercer.edu
Thu Nov 12 12:01:08 EST 2026


Chandler asked a great question -- is there a limit to the size of the 
happy number inputs.   I am going to say yes -- with the limits being 
between 1 and 2147483647.  That should make make it possible to read 
your numbers into integers without any difficulty.

Be prepared though -- you could have scenarios where the numbers 
computed in your series could grow to larger than this so you may want 
to consider using larger integer types for the actual computation phase.

-- 
*Andrew J. Pounds, Ph.D.*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA, 31207 (478) 301-5627 /
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc330/attachments/20261112/d38c4f12/attachment.htm>


More information about the csc330 mailing list