I was wondering what big numbers are, and what are some common algorithms used to handle them. I heard this term mentioned in Coders at Work, where one was asked in an interview to create a library to work with big numbers.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Big numbers are usually full-precision integers or decimals, as opposed to floating point numbers (which can also store very large numbers, but with a very limited precision). They are mostly used in cryptography. Take for example RSA keys: Those are integers with 1024 or 2048 bits (roughly 300 or 600 decimal digits). They need to be long to make it unfeasible to break the encryption using brute-force calculations.
What a library needs to provide is support to store these numbers and perform calculations on them (e.g. addition, multiplication, integer division with rest)