Skip to content

Commit

Permalink
minor: short form function for inv
Browse files Browse the repository at this point in the history
Co-authored-by: Mustafa M <[email protected]>
  • Loading branch information
Liozou and musm authored May 1, 2020
1 parent 3f6ffa0 commit b4743dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/rational.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function *(y::Integer, x::Rational)
end
/(x::Rational, y::Union{Rational, Integer, Complex{<:Union{Integer,Rational}}}) = x//y
/(x::Union{Integer, Complex{<:Union{Integer,Rational}}}, y::Rational) = x//y
function inv(x::Rational{T}) where T
inv(x::Rational{T}) where {T} = checked_den(x.den, x.num)
checked_den(x.den, x.num)
end

Expand Down

0 comments on commit b4743dd

Please sign in to comment.