eulergamma
Euler-Mascheroni constant, 0.5772, as a symbolic constant.
Category: Mathematics > Mathematical Functions
Syntax
eulergamma
Symbolic constant equal to the limit of 1 + 1/2 + ... + 1/n - log(n).
Description
The constant measures how far the harmonic sum is from the logarithm. It shows up in the series of the exponential and cosine integrals, in the gamma function (-gamma'(1)) and in number theory. It is unknown whether it is rational.
Output arguments
g- Symbolic constant, exact until converted with
doubleorvpa.
Example
Symbolic and numeric value
eulergamma
vpa(eulergamma, 10)
sum(1./(1:1000)) - log(1000)
Output
ans = eulergamma
ans = 0.5772156649
ans = 0.5777