Skip to content

Commit

Permalink
[doc] spaces between parameters (readability) in jldoctests (#42385)
Browse files Browse the repository at this point in the history
  • Loading branch information
EQt authored Sep 26, 2021
1 parent b867b97 commit 1790cef
Showing 1 changed file with 21 additions and 21 deletions.
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

0 comments on commit 1790cef

Please sign in to comment.