From 6b2eca42719d414286e74ac2587be1fdbeb854de Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Sat, 6 Sep 2014 12:53:32 +0530 Subject: [PATCH] make `big` map ranges to ranges --- base/abstractarray.jl | 2 +- base/number.jl | 3 ++- base/sysimg.jl | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index cdfa0abe14e6c..4986d9c7f3ef6 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -345,7 +345,7 @@ for fn in _numeric_conversion_func_names end end -for fn in (:float,:float16,:float32,:float64) +for fn in (:float,:float16,:float32,:float64,:big) @eval begin $fn(r::FloatRange) = FloatRange($fn(r.start), $fn(r.step), r.len, $fn(r.divisor)) end diff --git a/base/number.jl b/base/number.jl index 16de2c217f376..a0b641346e040 100644 --- a/base/number.jl +++ b/base/number.jl @@ -56,4 +56,5 @@ one{T<:Number}(::Type{T}) = oftype(T,1) const _numeric_conversion_func_names = (:int,:integer,:signed,:int8,:int16,:int32,:int64,:int128, :uint,:unsigned,:uint8,:uint16,:uint32,:uint64,:uint128, - :float,:float16,:float32,:float64) + :float,:float16,:float32,:float64, + :big) diff --git a/base/sysimg.jl b/base/sysimg.jl index c9b6694af79fc..3c69dbc01fea1 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -176,7 +176,6 @@ importall .MPFR big(n::Integer) = convert(BigInt,n) big(x::FloatingPoint) = convert(BigFloat,x) big(q::Rational) = big(num(q))//big(den(q)) -big(z::Complex) = complex(big(real(z)),big(imag(z))) # more hashing definitions include("hashing2.jl")