# Tonight I hated julia, REPL and overflows

**URL:** <https://discourse.julialang.org/t/tonight-i-hated-julia-repl-and-overflows/34884>\
**Category:** New to Julia\
**Tags:** integer-overflow\
**Created:** [February 20, 2020, 2:10am UTC](https://discourse.julialang.org/t/tonight-i-hated-julia-repl-and-overflows/34884 "2020-02-20T02:10:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [February 20, 2020, 2:56am UTC](https://discourse.julialang.org/t/tonight-i-hated-julia-repl-and-overflows/34884/4 "2020-02-20T02:56:45Z")

</div>

Hi, welcome!  
To find why you got no warning about overflow, google: julia overflow integer. Eg, here is a good thread [A plea for int overflow checking as the default](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338)

I think the following does what you want

```julia
julia> p(n) = 1 - prod(collect(365:-1:(365-n+1))) / 365^n;

julia> p(big(23))
0.50729723432398540722...

```

This sends an argument of type `BigInt`. Because of promotion rules, all of the relevant calculations are done with `BigInt`s.

---

_[View the full topic](https://discourse.julialang.org/t/tonight-i-hated-julia-repl-and-overflows/34884)._
