# gamma(::BigFloat) overflows on Windows

**URL:** https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169
**Category:** General Usage
**Tags:** specialfunctions
**Created:** [April 28, 2021, 1:53pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169 "2021-04-28T13:53:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [April 28, 2021, 1:53pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/1 "2021-04-28T13:53:36Z")

</div>

```julia
jl> p = big(3.6e13)
3.6e+13

jl> q = 1/big(0.563483398)+1
2.774675178628776489804929213602311938188089959295862682297487944939957397047059

jl> beta(p, q)
NaN

```

?? 😕

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [April 28, 2021, 1:55pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/2 "2021-04-28T13:55:46Z")

</div>

> [@Differences in MATLAB's versus Julia's beta(x, y) for large x or y?](https://discourse.julialang.org/t/differences-in-matlabs-versus-julias-beta-x-y-for-large-x-or-y/60138/7):
>
> ```julia
> julia> gamma(big(3.6e13))
> 7.882861104028365451673058070377064242970022825665897715265241972922672893761775e+472392288679098
> 
> ```

On my computer:

```julia
jl> gamma(big(3.6e13))
Inf

jl> @which gamma(big(3.6e13))
gamma(x::BigFloat) in SpecialFunctions at C:\Users\dnf\.julia\packages\SpecialFunctions\mFAQ4\src\gamma.jl:578

```

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [April 28, 2021, 1:58pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/3 "2021-04-28T13:58:43Z")

</div>

Hunh. I’m also Julia 1.6, SpecialFunctions 1.3.0. How did you install Julia? On what platform?

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [April 28, 2021, 2:11pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/4 "2021-04-28T14:11:40Z")

</div>

I have two different installations: Julia 1.6.0 on Windows 10, and version 1.6.1 on WSL2 under Windows 10 (it’s on the same system).

The ordinary Windows installation:

```julia
jl> gamma(big(3.6e13))
Inf

```

while the one under WSL2:

```julia
jl> gamma(big(3.6e13))
7.882861104028365451673058070377064242970022825665897715265241972922672893761775e+472392288679098

```

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [April 28, 2021, 2:16pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/5 "2021-04-28T14:16:32Z")

</div>

I’ve split this out — would you be willing to file a bug report? You seem uniquely well placed to look at precisely the differences that are causing this.

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [April 28, 2021, 2:37pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/7 "2021-04-28T14:37:12Z")

</div>

Yes, I can do that later today.

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [April 28, 2021, 7:51pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/8 "2021-04-28T19:51:35Z")

</div>

[https://github.com/JuliaMath/SpecialFunctions.jl/issues/309](https://github.com/JuliaMath/SpecialFunctions.jl/issues/309)

---

<div class="post-metadata">

### Author: ![bashonubuntu](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)
#### Post date: [April 29, 2021, 2:36pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169/9 "2021-04-29T14:36:24Z")

</div>

Hey @DNF and @mbauman, thanks for taking so much time to reply to the other thread.

When I opened the other post, I hadn’t foreseen it could help in uncovering a related issue.

I’ll be watching the github issue closely – thanks again for taking out so much time for this 🙂
