I need a large integer with a fixed value of allocated memory. For example, under this number I want to allocate strictly 128 bytes. At the same time with this number you need to perform simple arithmetic operations: addition, subtraction, exponentiation. Just BigInteger from System.Numerics does not suit me, as it dynamically allocates memory for numbers.

How to be?

  • and did not try to use the byte array? - Monomax
  • For example, under this number I want to allocate strictly 128 bytes. Yes, no question, select and store. And for calculations, convert it to BigInteger from System.Numerics (and the result is, respectively, back). Or is it necessary in principle to exclude any possibility of dynamic work with memory? - Akina
  • No, I have not tried. I will try to implement - accomplish your goal - Breadpack
  • @Akina just like that - Breadpack
  • @Monomax don't quite understand what you mean. I need one big number, while an array is an array. If I try to make a BigIntger number out of it, then it will still manage memory dynamically - Breadpack

0