diff --git a/base/int.jl b/base/int.jl index 3ee0b62e4b59f..727d3333ab5b8 100644 --- a/base/int.jl +++ b/base/int.jl @@ -32,8 +32,9 @@ typealias BitUnsigned64T Union{Type{UInt8},Type{UInt16},Type{UInt32},Type{UInt64 +{T<:BitInteger}(x::T, y::T) = box(T, add_int(unbox(T,x),unbox(T,y))) *{T<:BitInteger}(x::T, y::T) = box(T, mul_int(unbox(T,x),unbox(T,y))) -/(x::Integer, y::Integer) = float(x)/float(y) inv(x::Integer) = float(one(x))/float(x) +/{T<:Integer}(x::T, y::T) = float(x)/float(y) +/(x::BitInteger, y::BitInteger) = float(x)/float(y) """ isodd(x::Integer) -> Bool