# Understanding BigInt

**URL:** https://discourse.julialang.org/t/understanding-bigint/21337
**Category:** Numerics
**Created:** [March 1, 2019, 10:40am UTC](https://discourse.julialang.org/t/understanding-bigint/21337 "2019-03-01T10:40:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [March 1, 2019, 10:40am UTC](https://discourse.julialang.org/t/understanding-bigint/21337/1 "2019-03-01T10:40:25Z")

</div>

Playing aroudn with types yesterday I found typemax(BigInt) does not exist. Which makes perfect sense. the Julia documentation on Arbitrary Precision Arithmetic refers to the Gnu GMP.  
Would this be the best place to read up on BigInt?

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [March 1, 2019, 11:26am UTC](https://discourse.julialang.org/t/understanding-bigint/21337/2 "2019-03-01T11:26:09Z")

</div>

Depends on what you want to know about BigInt. GMP _says_ they go up to arbitrary size, but in reality they’re limited by the number of bits for one BigInt (they save the size as something equivalent to an int32\_t representing the number of bits in one BigInt…). For most practical applications this is enough though.

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [March 1, 2019, 11:44am UTC](https://discourse.julialang.org/t/understanding-bigint/21337/3 "2019-03-01T11:44:32Z")

</div>

Thanks 🙂 I am just interested in how this is stored. Nothing I desperately need to know!

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [March 1, 2019, 11:46am UTC](https://discourse.julialang.org/t/understanding-bigint/21337/4 "2019-03-01T11:46:49Z")

</div>

Gotcha - you’re most likely to find information about this in the GMP documentation. As far as I know, they’re using custom memory management in C to avoid repeated and unnecessary allocations. You shouldn’t worry about it in general though.
