How do I declare an integer with a storage capacity of 30 bytes?

Asked

Viewed 42 times

0

My question is the following: I know that the Python language interpreter is done in C. In Python the numerical variables have no size restriction, that is, the more we add value to variable, plus the variable increases the amount of bytes so that it is possible to store the value. As I do in C to declare, for example, variables with 30 bytes of size to store integers or floating numbers?

  • 2

    In essence you have to do something very complex to manage it. Storing is the easy part, the problem is operating at this value. But you may have another solution for what you need.

  • 2

    If you want to work on something already done you can use the library GMP, otherwise only implementing manually, but as @Maniero indicated is not an easy thing.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.