Euler's constant 0.5772...: Difference between revisions

m
m (→‎{{header|J}}: show how to configure display precision of floating point numbers)
Line 862:
=={{header|J}}==
 
We can approximate euler's constant using the difference between the gamma functionreciprocal and the reciprocalgamma function of a small number:
<syntaxhighlight lang=J> (%-!@<:-%)2^_27
_00.5772156715393066</syntaxhighlight>
 
For higher accuracy we can use a variation on the [[#C|C]] implementation which was attributed to [https://www.ams.org/journals/mcom/1980-34-149/S0025-5718-1980-0551307-4/S0025-5718-1980-0551307-4.pdf Richard P. Brent and Edwin M. McMillan]:
6,962

edits