Skip to content

Commit 2912c9e

Browse files
committed
Remove dupe digamma, fix docstrings
1 parent 79a2e01 commit 2912c9e

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

base/docs/helpdb/Base.jl

-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ Raises a `SystemError` for `errno` with the descriptive string `sysfunc` if `ift
99
"""
1010
systemerror
1111

12-
"""
13-
digamma(x)
14-
15-
Compute the digamma function of `x` (the logarithmic derivative of `gamma(x)`)
16-
"""
17-
digamma
18-
1912
"""
2013
fill!(A, x)
2114

base/special/trig.jl

+12-6
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,20 @@ for (finv, f) in ((:sec, :cos), (:csc, :sin), (:cot, :tan),
319319
end
320320
end
321321

322-
for (fa, fainv, fn) in ((:asec, :acos, "secant"), (:acsc, :asin, "cosecant"), (:acot, :atan, "cotangent"),
323-
(:asech, :acosh, "hyperbolic secant"), (:acsch, :asinh, "hyperbolic cosecant"), (:acoth, :atanh, "hyperbolic cotangent"))
324-
name = string(fa)
322+
for (tfa, tfainv, hfa, hfainv, fn) in ((:asec, :acos, :asech, :acosh, "secant"),
323+
(:acsc, :asin, :acsch, :asinh, "cosecant"),
324+
(:acot, :atan, :acoth, :atahn, "cotangent"))
325+
tname = string(tfa)
326+
hname = string(hfa)
325327
@eval begin
326328
@doc """
327-
$($name)(x)
328-
Compute the $($fn) of `x`, where the output is in radians. """ ($fa){T<:Number}(y::T) = ($fainv)(one(T) / y)
329-
($fa){T<:Number}(y::AbstractArray{T}) = ($fainv)(one(T) ./ y)
329+
$($tname)(x)
330+
Compute the inverse $($fn) of `x`, where the output is in radians. """ ($tfa){T<:Number}(y::T) = ($tfainv)(one(T) / y)
331+
($tfa){T<:Number}(y::AbstractArray{T}) = ($tfainv)(one(T) ./ y)
332+
@doc """
333+
$($hname)(x)
334+
Compute the inverse hyperbolic $($fn) of `x`. """ ($hfa){T<:Number}(y::T) = ($hfainv)(one(T) / y)
335+
($hfa){T<:Number}(y::AbstractArray{T}) = ($hfainv)(one(T) ./ y)
330336
end
331337
end
332338

doc/stdlib/math.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ Mathematical Functions
664664

665665
.. Docstring generated from Julia source
666666
667-
Compute the inverse cosecant of ``x``\ , where the output is in radians
667+
Compute the inverse cosecant of ``x``\ , where the output is in radians.
668668

669669
.. function:: acot(x)
670670

0 commit comments

Comments
 (0)