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

Spaces between parameters (readability) in jldoctests #42385

Merged
merged 1 commit into from
Sep 26, 2021
Merged
Changes from all 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
42 changes: 21 additions & 21 deletions base/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ The arguments may be integer and rational numbers.

# Examples
```jldoctest
julia> gcd(6,9)
julia> gcd(6, 9)
3

julia> gcd(6,-9)
julia> gcd(6, -9)
3

julia> gcd(6,0)
julia> gcd(6, 0)
6

julia> gcd(0,0)
julia> gcd(0, 0)
0

julia> gcd(1//3,2//3)
julia> gcd(1//3, 2//3)
1//3

julia> gcd(1//3,-2//3)
julia> gcd(1//3, -2//3)
1//3

julia> gcd(1//3,2)
julia> gcd(1//3, 2)
1//3

julia> gcd(0, 0, 10, 15)
Expand Down Expand Up @@ -90,33 +90,33 @@ The arguments may be integer and rational numbers.

# Examples
```jldoctest
julia> lcm(2,3)
julia> lcm(2, 3)
6

julia> lcm(-2,3)
julia> lcm(-2, 3)
6

julia> lcm(0,3)
julia> lcm(0, 3)
0

julia> lcm(0,0)
julia> lcm(0, 0)
0

julia> lcm(1//3,2//3)
julia> lcm(1//3, 2//3)
2//3

julia> lcm(1//3,-2//3)
julia> lcm(1//3, -2//3)
2//3

julia> lcm(1//3,2)
julia> lcm(1//3, 2)
2//1

julia> lcm(1,3,5,7)
julia> lcm(1, 3, 5, 7)
105
```
"""
function lcm(a::T, b::T) where T<:Integer
# explicit a==0 test is to handle case of lcm(0,0) correctly
# explicit a==0 test is to handle case of lcm(0, 0) correctly
# explicit b==0 test is to handle case of lcm(typemin(T),0) correctly
if a == 0 || b == 0
return zero(a)
Expand Down Expand Up @@ -214,13 +214,13 @@ and ``div(y,m) = 0``. This will throw an error if ``m = 0``, or if

# Examples
```jldoctest
julia> invmod(2,5)
julia> invmod(2, 5)
3

julia> invmod(2,3)
julia> invmod(2, 3)
2

julia> invmod(5,6)
julia> invmod(5, 6)
5
```
"""
Expand Down Expand Up @@ -894,14 +894,14 @@ the array length. If the array length is excessive, the excess portion is filled

# Examples
```jldoctest
julia> digits!([2,2,2,2], 10, base = 2)
julia> digits!([2, 2, 2, 2], 10, base = 2)
4-element Vector{Int64}:
0
1
0
1

julia> digits!([2,2,2,2,2,2], 10, base = 2)
julia> digits!([2, 2, 2, 2, 2, 2], 10, base = 2)
6-element Vector{Int64}:
0
1
Expand Down