Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add many "see also" links to docstrings #38606

Merged
merged 29 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/irrationals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for integers `n` will give a rational result when `n` is a perfect square), then
abstract type AbstractIrrational <: Real end

"""
Irrational{sym} <: AbstractIrrational
`Irrational{sym}` <: [`AbstractIrrational`](@ref)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I didn't necessarily mean we should do this now. I'm probably in favor, but we should let others respond first in a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, now reverted.

Possibly it could be done at a higher level, too, just make all types in docstrings clickable somehow?


Number type representing an exact irrational value denoted by the
symbol `sym`, such as [`π`](@ref pi), [`ℯ`](@ref) and [`γ`](@ref Base.MathConstants.eulergamma).
Expand Down
18 changes: 17 additions & 1 deletion base/special/exp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,17 @@ end
@doc """
exp(x)

Compute the natural base exponential of `x`, in other words ``e^x``.
Compute the natural base exponential of `x`, in other words ``ℯ^x``.

See also [`exp2`](@ref), [`exp10`](@ref) and [`cis`](@ref).

# Examples
```jldoctest
julia> exp(1.0)
2.718281828459045

julia> exp(im * pi) == cis(pi)
true
```
""" exp(x::Real)

Expand All @@ -279,10 +284,18 @@ julia> exp(1.0)

Compute the base 2 exponential of `x`, in other words ``2^x``.

See also [`ldexp`](@ref), [`<<`](@ref).

# Examples
```jldoctest
julia> exp2(5)
32.0

julia> 2^5
32

julia> exp2(63) > typemax(Int)
true
```
"""
exp2(x)
Expand All @@ -296,6 +309,9 @@ Compute the base 10 exponential of `x`, in other words ``10^x``.
```jldoctest
julia> exp10(2)
100.0

julia> 10^2
100
```
"""
exp10(x)
Expand Down
3 changes: 0 additions & 3 deletions base/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ end
Print (using [`print`](@ref)) `xs` followed by a newline.
If `io` is not supplied, prints to [`stdout`](@ref).

See also [`@show`](@ref) to print variables names with values,
and [`Printf.@printf`](@ref man-printf) to format numbers.

# Examples
```jldoctest
julia> println("Hello, world")
Expand Down