Skip to content

Commit 0aac966

Browse files
committed
Move docs out of helpDB, make them less verbose.
1 parent 2d24eda commit 0aac966

File tree

3 files changed

+71
-149
lines changed

3 files changed

+71
-149
lines changed

base/docs/helpdb/Base.jl

-144
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ tab-delimited text to `f` by either `writedlm(f, [x y])` or by `writedlm(f, zip(
2222
"""
2323
writedlm
2424

25-
"""
26-
digamma(x)
27-
28-
Compute the digamma function of `x` (the logarithmic derivative of `gamma(x)`)
29-
"""
30-
digamma
31-
3225
"""
3326
fill!(A, x)
3427
@@ -523,13 +516,6 @@ A string giving the literal bit representation of a number.
523516
"""
524517
bits
525518

526-
"""
527-
invdigamma(x)
528-
529-
Compute the inverse digamma function of `x`.
530-
"""
531-
invdigamma
532-
533519
"""
534520
getindex(type[, elements...])
535521
@@ -609,13 +595,6 @@ used as the final delimiter instead of `delim`.
609595
"""
610596
join(io, items, delim, last)
611597

612-
"""
613-
lfact(x)
614-
615-
Compute the logarithmic factorial of `x`
616-
"""
617-
lfact
618-
619598
"""
620599
deconv(b,a)
621600
@@ -1007,15 +986,6 @@ Test whether a matrix is lower triangular.
1007986
"""
1008987
istril
1009988

1010-
"""
1011-
lgamma(x)
1012-
1013-
Compute the logarithm of the absolute value of [`gamma`](:func:`gamma`) for
1014-
[`Real`](:obj:`Real`) `x`, while for [`Complex`](:obj:`Complex`) `x` it computes the
1015-
logarithm of `gamma(x)`.
1016-
"""
1017-
lgamma
1018-
1019989
"""
1020990
bin(n, [pad])
1021991
@@ -1445,13 +1415,6 @@ Close an I/O stream. Performs a `flush` first.
14451415
"""
14461416
close(stream::IO)
14471417

1448-
"""
1449-
cospi(x)
1450-
1451-
Compute ``\\cos(\\pi x)`` more accurately than `cos(pi*x)`, especially for large `x`.
1452-
"""
1453-
cospi
1454-
14551418
"""
14561419
parentindexes(A)
14571420
@@ -2420,13 +2383,6 @@ Bessel function of the first kind of order 1, ``J_1(x)``.
24202383
"""
24212384
besselj1
24222385

2423-
"""
2424-
sinpi(x)
2425-
2426-
Compute ``\\sin(\\pi x)`` more accurately than `sin(pi*x)`, especially for large `x`.
2427-
"""
2428-
sinpi
2429-
24302386
"""
24312387
select!(v, k, [by=<transform>,] [lt=<comparison>,] [rev=false])
24322388
@@ -2872,13 +2828,6 @@ Seek a stream to the given position.
28722828
"""
28732829
seek
28742830

2875-
"""
2876-
acosd(x)
2877-
2878-
Compute the inverse cosine of `x`, where the output is in degrees.
2879-
"""
2880-
acosd
2881-
28822831
"""
28832832
triu(M)
28842833
@@ -3013,13 +2962,6 @@ Equivalent to `stat(file).size`.
30132962
"""
30142963
filesize
30152964

3016-
"""
3017-
sinc(x)
3018-
3019-
Compute ``\\sin(\\pi x) / (\\pi x)`` if ``x \\neq 0``, and ``1`` if ``x = 0``.
3020-
"""
3021-
sinc
3022-
30232965
"""
30242966
cglobal((symbol, library) [, type=Void])
30252967
@@ -3650,13 +3592,6 @@ Returns the smallest eigenvalue of `A`.
36503592
"""
36513593
eigmin
36523594

3653-
"""
3654-
acscd(x)
3655-
3656-
Compute the inverse cosecant of `x`, where the output is in degrees.
3657-
"""
3658-
acscd
3659-
36603595
"""
36613596
ltoh(x)
36623597
@@ -4142,13 +4077,6 @@ is `-1` the corresponding ID will not change. Only integer `owner`s and `group`s
41424077
"""
41434078
chown
41444079

4145-
"""
4146-
gamma(x)
4147-
4148-
Compute the gamma function of `x`.
4149-
"""
4150-
gamma
4151-
41524080
"""
41534081
sin(x)
41544082
@@ -4855,13 +4783,6 @@ For more information, see [^issue8859], [^B96], [^S84], [^KY88].
48554783
"""
48564784
pinv
48574785

4858-
"""
4859-
asecd(x)
4860-
4861-
Compute the inverse secant of `x`, where the output is in degrees.
4862-
"""
4863-
asecd
4864-
48654786
"""
48664787
readbytes!(stream::IO, b::AbstractVector{UInt8}, nb=length(b); all=true)
48674788
@@ -4888,13 +4809,6 @@ descriptive error string.
48884809
"""
48894810
ArgumentError
48904811

4891-
"""
4892-
atand(x)
4893-
4894-
Compute the inverse tangent of `x`, where the output is in degrees.
4895-
"""
4896-
atand
4897-
48984812
"""
48994813
KeyError(key)
49004814
@@ -5062,13 +4976,6 @@ Test whether a matrix is Hermitian.
50624976
"""
50634977
ishermitian
50644978

5065-
"""
5066-
sind(x)
5067-
5068-
Compute sine of `x`, where `x` is in degrees.
5069-
"""
5070-
sind
5071-
50724979
"""
50734980
min(x, y, ...)
50744981
@@ -5380,14 +5287,6 @@ two strings. For example
53805287
"""
53815288
join(strings, delim, last)
53825289

5383-
"""
5384-
polygamma(m, x)
5385-
5386-
Compute the polygamma function of order `m` of argument `x` (the `(m+1)th` derivative of the
5387-
logarithm of `gamma(x)`)
5388-
"""
5389-
polygamma
5390-
53915290
"""
53925291
isless(x, y)
53935292
@@ -6055,13 +5954,6 @@ Returns `string` with all characters converted to uppercase.
60555954
"""
60565955
uppercase
60575956

6058-
"""
6059-
cosd(x)
6060-
6061-
Compute cosine of `x`, where `x` is in degrees.
6062-
"""
6063-
cosd
6064-
60655957
"""
60665958
cycle(iter)
60675959
@@ -6500,13 +6392,6 @@ lengths of dimensions you asked for.
65006392
"""
65016393
size
65026394

6503-
"""
6504-
trigamma(x)
6505-
6506-
Compute the trigamma function of `x` (the logarithmic second derivative of `gamma(x)`).
6507-
"""
6508-
trigamma
6509-
65106395
"""
65116396
findmin(A, dims) -> (minval, index)
65126397
@@ -7188,13 +7073,6 @@ but throws an error for unordered arguments.
71887073
"""
71897074
cmp
71907075

7191-
"""
7192-
tand(x)
7193-
7194-
Compute tangent of `x`, where `x` is in degrees.
7195-
"""
7196-
tand
7197-
71987076
"""
71997077
issorted(v, [by=<transform>,] [lt=<comparison>,] [rev=false])
72007078
@@ -7583,14 +7461,6 @@ Test whether any values along the given dimensions of an array are `true`.
75837461
"""
75847462
any(::AbstractArray,dims)
75857463

7586-
"""
7587-
cosc(x)
7588-
7589-
Compute ``\\cos(\\pi x) / x - \\sin(\\pi x) / (\\pi x^2)`` if ``x \\neq 0``, and ``0`` if
7590-
``x = 0``. This is the derivative of `sinc(x)`.
7591-
"""
7592-
cosc
7593-
75947464
"""
75957465
getkey(collection, key, default)
75967466
@@ -7612,13 +7482,6 @@ For matrices or vectors ``A`` and ``B``, calculates ``Aᴴ Bᴴ``.
76127482
"""
76137483
Ac_mul_Bc
76147484

7615-
"""
7616-
acotd(x)
7617-
7618-
Compute the inverse cotangent of `x`, where the output is in degrees.
7619-
"""
7620-
acotd
7621-
76227485
"""
76237486
zeros(type, dims)
76247487
@@ -8313,13 +8176,6 @@ julia> f(apple)
83138176
"""
83148177
:@enum
83158178

8316-
"""
8317-
asind(x)
8318-
8319-
Compute the inverse sine of `x`, where the output is in degrees.
8320-
"""
8321-
asind
8322-
83238179
"""
83248180
widemul(x, y)
83258181

base/special/gamma.jl

+40
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
gamma(x::Float64) = nan_dom_err(ccall((:tgamma,libm), Float64, (Float64,), x), x)
44
gamma(x::Float32) = nan_dom_err(ccall((:tgammaf,libm), Float32, (Float32,), x), x)
5+
6+
"""
7+
gamma(x)
8+
9+
Compute the gamma function of `x`.
10+
"""
511
gamma(x::Real) = gamma(float(x))
612
@vectorize_1arg Number gamma
713

@@ -19,6 +25,11 @@ lgamma_r(x::Real) = lgamma_r(float(x))
1925
lgamma_r(x::Number) = lgamma(x), 1 # lgamma does not take abs for non-real x
2026
"`lgamma_r(x)`: return L,s such that `gamma(x) = s * exp(L)`" lgamma_r
2127

28+
"""
29+
lfact(x)
30+
31+
Compute the logarithmic factorial of `x`
32+
"""
2233
lfact(x::Real) = (x<=1 ? zero(float(x)) : lgamma(x+one(x)))
2334
@vectorize_1arg Number lfact
2435

@@ -47,6 +58,13 @@ function clgamma_lanczos(z)
4758
return log(zz) - temp
4859
end
4960

61+
"""
62+
lgamma(x)
63+
64+
Compute the logarithm of the absolute value of [`gamma`](:func:`gamma`) for
65+
[`Real`](:obj:`Real`) `x`, while for [`Complex`](:obj:`Complex`) `x` it computes the
66+
logarithm of `gamma(x)`.
67+
"""
5068
function lgamma(z::Complex)
5169
if real(z) <= 0.5
5270
a = clgamma_lanczos(1-z)
@@ -69,6 +87,11 @@ gamma(z::Complex) = exp(lgamma(z))
6987
# const A002445 = [1,6,30,42,30,66,2730,6,510,798,330,138,2730,6,870,14322,510,6,1919190,6,13530]
7088
# const bernoulli = A000367 .// A002445 # even-index Bernoulli numbers
7189

90+
"""
91+
digamma(x)
92+
93+
Compute the digamma function of `x` (the logarithmic derivative of `gamma(x)`)
94+
"""
7295
function digamma(z::Union{Float64,Complex{Float64}})
7396
# Based on eq. (12), without looking at the accompanying source
7497
# code, of: K. S. Kölbig, "Programs for computing the logarithm of
@@ -98,6 +121,11 @@ function digamma(z::Union{Float64,Complex{Float64}})
98121
ψ -= t * @evalpoly(t,0.08333333333333333,-0.008333333333333333,0.003968253968253968,-0.004166666666666667,0.007575757575757576,-0.021092796092796094,0.08333333333333333,-0.4432598039215686)
99122
end
100123

124+
"""
125+
trigamma(x)
126+
127+
Compute the trigamma function of `x` (the logarithmic second derivative of `gamma(x)`).
128+
"""
101129
function trigamma(z::Union{Float64,Complex{Float64}})
102130
# via the derivative of the Kölbig digamma formulation
103131
x = real(z)
@@ -360,6 +388,12 @@ function zeta(s::Union{Int,Float64,Complex{Float64}},
360388
return ζ
361389
end
362390

391+
"""
392+
polygamma(m, x)
393+
394+
Compute the polygamma function of order `m` of argument `x` (the `(m+1)th` derivative of the
395+
logarithm of `gamma(x)`)
396+
"""
363397
function polygamma(m::Integer, z::Union{Float64,Complex{Float64}})
364398
m == 0 && return digamma(z)
365399
m == 1 && return trigamma(z)
@@ -445,6 +479,12 @@ function invdigamma(y::Float64)
445479
return x_new
446480
end
447481
invdigamma(x::Float32) = Float32(invdigamma(Float64(x)))
482+
483+
"""
484+
invdigamma(x)
485+
486+
Compute the inverse digamma function of `x`.
487+
"""
448488
invdigamma(x::Real) = invdigamma(Float64(x))
449489
@vectorize_1arg Real invdigamma
450490

0 commit comments

Comments
 (0)