Integers & longs can only hold numbers up to 2**31 and 2**63 respectively. In an attempt to solve this problem, I wrote up a solution for computing the factorial with long and after a certain number, I started getting negative results! Longs are signed which effectively means I have 2**31 positive long values and 2**31 negative long values.
BigInteger
Published by Jane Ullah
I am a wife, student, consumer, and a tech. enthusiast! @janetalkstech. View all posts by Jane Ullah
Published