# Integer overflow in cumprod (cumulative product) output

**URL:** <https://discourse.julialang.org/t/integer-overflow-in-cumprod-cumulative-product-output/33037>\
**Category:** New to Julia\
**Tags:** numbers, integer-overflow\
**Created:** [January 6, 2020, 6:58pm UTC](https://discourse.julialang.org/t/integer-overflow-in-cumprod-cumulative-product-output/33037 "2020-01-06T18:58:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 6, 2020, 7:04pm UTC](https://discourse.julialang.org/t/integer-overflow-in-cumprod-cumulative-product-output/33037/2 "2020-01-06T19:04:02Z")

</div>

This is integer overflow. If you want to work with huge integers without overflow, use `BigInt`. (Or use floating-point calculations.)

See e.g. [the manual on overflow](https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/index.html#Overflow-behavior-1) or [this discussion](https://discourse.julialang.org/t/julia-messes-up-integer-exponents/20773/2) or [other similar discussions](https://discourse.julialang.org/search?q=integer%20overflow).

---

_[View the full topic](https://discourse.julialang.org/t/integer-overflow-in-cumprod-cumulative-product-output/33037)._
