0

I have a problem where I need to calculate integers with over 25 digits. I am using long long int but that stores a maximum of 19 digits. Thank you.

cat
  • 1
  • 1
  • maybe something based on array of char? `char big1[25] = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3};` – pmg Dec 08 '19 at 14:08
  • there are a lot of duplicates in the [tag:bigint] and [tag:biginteger] tag. [How do you store an arbitrarily large integer value in memory?](https://stackoverflow.com/q/2252896/995714), [which datatype should i use to store a variable 10^200 in C language?](https://stackoverflow.com/q/23588717/995714), [Handling large numbers in C++?](https://stackoverflow.com/q/117429/995714) – phuclv Dec 08 '19 at 15:34

1 Answers1

0

You can refer to the following thread -

I prefer this answer, which is using array.

Ofir Kariv
  • 76
  • 7