diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 82604311cd1cc..e84547a23a682 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -9,13 +9,6 @@ Raises a `SystemError` for `errno` with the descriptive string `sysfunc` if `ift """ systemerror -""" - digamma(x) - -Compute the digamma function of `x` (the logarithmic derivative of `gamma(x)`) -""" -digamma - """ fill!(A, x) @@ -976,13 +969,6 @@ seeding. """ srand -""" - acot(x) - -Compute the inverse cotangent of `x`, where the output is in radians. -""" -acot - """ oftype(x, y) @@ -2640,13 +2626,6 @@ Get the concrete type of `x`. """ typeof -""" - acsc(x) - -Compute the inverse cosecant of `x`, where the output is in radians -""" -acsc - """ log(x) @@ -3059,13 +3038,6 @@ Element-wise less-than-or-equals comparison operator. """ Base.:(.<=) -""" - asec(x) - -Compute the inverse secant of `x`, where the output is in radians. -""" -asec - """ rank(M) @@ -4925,13 +4897,6 @@ recurses infinitely. """ StackOverflowError -""" - acsch(x) - -Compute the inverse hyperbolic cosecant of `x`. -""" -acsch - """ process_running(p::Process) @@ -5689,13 +5654,6 @@ Read a UDP packet from the specified socket, and return the bytes received. This """ recv -""" - acoth(x) - -Compute the inverse hyperbolic cotangent of `x`. -""" -acoth - """ det(M) @@ -6038,13 +5996,6 @@ the integrity and correctness of data read from `stream`. """ deserialize -""" - asech(x) - -Compute the inverse hyperbolic secant of `x`. -""" -asech - """ ismarked(s) diff --git a/base/special/trig.jl b/base/special/trig.jl index 087f2ad0338e6..2ad94211c590f 100644 --- a/base/special/trig.jl +++ b/base/special/trig.jl @@ -319,11 +319,20 @@ for (finv, f) in ((:sec, :cos), (:csc, :sin), (:cot, :tan), end end -for (fa, fainv) in ((:asec, :acos), (:acsc, :asin), (:acot, :atan), - (:asech, :acosh), (:acsch, :asinh), (:acoth, :atanh)) +for (tfa, tfainv, hfa, hfainv, fn) in ((:asec, :acos, :asech, :acosh, "secant"), + (:acsc, :asin, :acsch, :asinh, "cosecant"), + (:acot, :atan, :acoth, :atahn, "cotangent")) + tname = string(tfa) + hname = string(hfa) @eval begin - ($fa){T<:Number}(y::T) = ($fainv)(one(T) / y) - ($fa){T<:Number}(y::AbstractArray{T}) = ($fainv)(one(T) ./ y) + @doc """ + $($tname)(x) + Compute the inverse $($fn) of `x`, where the output is in radians. """ ($tfa){T<:Number}(y::T) = ($tfainv)(one(T) / y) + ($tfa){T<:Number}(y::AbstractArray{T}) = ($tfainv)(one(T) ./ y) + @doc """ + $($hname)(x) + Compute the inverse hyperbolic $($fn) of `x`. """ ($hfa){T<:Number}(y::T) = ($hfainv)(one(T) / y) + ($hfa){T<:Number}(y::AbstractArray{T}) = ($hfainv)(one(T) ./ y) end end diff --git a/doc/manual/integers-and-floating-point-numbers.rst b/doc/manual/integers-and-floating-point-numbers.rst index 9b37bff26eb08..0e79f2feb4952 100644 --- a/doc/manual/integers-and-floating-point-numbers.rst +++ b/doc/manual/integers-and-floating-point-numbers.rst @@ -317,7 +317,7 @@ only as a storage format. In calculations they'll be converted to ``Float32``: 2 julia> 2*Float16(4.) - 8.0f0 + Float16(8.0) The underscore ``_`` can be used as digit separator: diff --git a/doc/stdlib/math.rst b/doc/stdlib/math.rst index 7c9a7c653e808..91b6c7d926867 100644 --- a/doc/stdlib/math.rst +++ b/doc/stdlib/math.rst @@ -664,7 +664,7 @@ Mathematical Functions .. Docstring generated from Julia source - Compute the inverse cosecant of ``x``\ , where the output is in radians + Compute the inverse cosecant of ``x``\ , where the output is in radians. .. function:: acot(x)