@@ -541,7 +541,7 @@ function float{T}(A::AbstractArray{T})
541541 convert (AbstractArray{typeof (float (zero (T)))}, A)
542542end
543543
544- for fn in (:float ,:big )
544+ for fn in (:float ,)
545545 @eval begin
546546 $ fn (r:: StepRange ) = $ fn (r. start): $ fn (r. step): $ fn (last (r))
547547 $ fn (r:: UnitRange ) = $ fn (r. start): $ fn (last (r))
@@ -554,5 +554,15 @@ for fn in (:float,:big)
554554 end
555555end
556556
557- big {T<:AbstractFloat,N} (x:: AbstractArray{T,N} ) = convert (AbstractArray{BigFloat,N}, x)
558- big {T<:Integer,N} (x:: AbstractArray{T,N} ) = convert (AbstractArray{BigInt,N}, x)
557+ # big, broadcast over arrays
558+ # TODO : do the definitions below primarily pertaining to integers belong in float.jl?
559+ function big end # no prior definitions of big in sysimg.jl, necessitating this
560+ broadcast {T<:Integer,N} (:: typeof (big), x:: AbstractArray{T,N} ) = convert (AbstractArray{BigInt,N}, x)
561+ broadcast {T<:AbstractFloat,N} (:: typeof (big), x:: AbstractArray{T,N} ) = convert (AbstractArray{BigFloat,N}, x)
562+ broadcast (:: typeof (big), r:: UnitRange ) = big (r. start): big (last (r))
563+ broadcast (:: typeof (big), r:: StepRange ) = big (r. start): big (r. step): big (last (r))
564+ broadcast (:: typeof (big), r:: FloatRange ) = FloatRange (big (r. start), big (r. step), r. len, big (r. divisor))
565+ function broadcast (:: typeof (big), r:: LinSpace )
566+ big (r. len) == r. len || throw (ArgumentError (string (r, " : too long for " , big)))
567+ LinSpace (big (r. start), big (r. stop), big (r. len), big (r. divisor))
568+ end
0 commit comments