# Calculation Pi^Pi^Pi in hexadecimal in High precision

**URL:** <https://discourse.julialang.org/t/calculation-pi-pi-pi-in-hexadecimal-in-high-precision/51785>\
**Category:** Numerics\
**Tags:** precision\
**Created:** [December 14, 2020, 2:32am UTC](https://discourse.julialang.org/t/calculation-pi-pi-pi-in-hexadecimal-in-high-precision/51785 "2020-12-14T02:32:50Z")\
**Posts on this page:** 1\
**Showing post:** 52

<div class="post-metadata">

**Author:** ![Marc.Cox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marc.cox/32/7514_2.png) [@Marc.Cox](https://discourse.julialang.org/u/Marc.Cox)\
**Post date:** [January 31, 2021, 6:12pm UTC](https://discourse.julialang.org/t/calculation-pi-pi-pi-in-hexadecimal-in-high-precision/51785/52 "2021-01-31T18:12:10Z")

</div>

Seems that using higher precision Julia packages I’ve discovered that **log(gamma( is related to PI** ;  
per using SpecialFunctions and using Nemo ?

using Julia SpecialFunctions and Nemo seems I’ve discovered that loggamma(-1 + 0i) = Infinity - i\*pi (a Complex number) .  
Also Wolframalpha answer is incomplete About: loggamma(-1 + 0i) or logΓ(-1 + 0 i)  
Try this link [loggamma(-1 + 0i) - Wolfram|Alpha](https://www.wolframalpha.com/input/?i=loggamma%28-1+%2B+0i%29)  
and you’ll see Wolframalpha shows loggamma(-1 + 0i) = Infinity

However it seems I’ve discovered/uncovered that loggamma(-1 + 0i) = Infinity - i\*pi (a Complex number) per the following :

```julia
## show using SpecialFunctions 
## loggamma(-1 + 0i) = Infinity - i*pi (a Complex number)
julia> loggamma(-1+0im)
Inf - 3.141592653589793im

julia> imag(loggamma(-1+0im))/pi
-1.0

## Showing Effects of error propagation ?
julia> log(gamma(-1+0im))
Inf - 2.356194490192345im

```

```julia
## Reconfirmed suspicion via show using Nemo to 64 Bits / 18 Decimals
using Nemo # for arbitrary precision math calculations 
CC = ComplexField(64)

julia> using Nemo
julia> CC = ComplexField(64)
Complex Field with 64 bits of precision and error bounds

julia> RR = RealField(64)
Real Field with 64 bits of precision and error bounds

julia> Nemo.lgamma(RR("-1") + CC("0"))
nan + i*[-3.141592653589793238 +/- 5.14e-19]
julia> Nemo.const_pi(RR)
         [3.141592653589793239 +/- 5.96e-19]

```

–

Also here’s an analytical/symbolic equation question :  
Is this the same or a different fact than the Euler Identity ?

Maybe start here Gamma, Beta, Erf \> LogGamma[z]

> Representations through more general functions \>\> [Logarithm of the gamma function: Representations through more general functions (subsection 26/01)](https://functions.wolfram.com/GammaBetaErf/LogGamma/26/01/)

---

_[View the full topic](https://discourse.julialang.org/t/calculation-pi-pi-pi-in-hexadecimal-in-high-precision/51785)._
