@@ -10,7 +10,7 @@ import Base: ==, <, <=, -, +, *, /, ~, isapprox,
1010 zero, oneunit, one, typemin, typemax, realmin, realmax, eps, sizeof, reinterpret,
1111 float, trunc, round, floor, ceil, bswap,
1212 div, fld, rem, mod, mod1, fld1, min, max, minmax,
13- start, next, done, r_promote, reducedim_init, rand
13+ start, next, done, reducedim_init, rand
1414if isdefined (Base, :rem1 )
1515 import Base: rem1
1616end
@@ -133,8 +133,12 @@ sizeof(::Type{T}) where {T <: FixedPoint} = sizeof(rawtype(T))
133133
134134# Promotions for reductions
135135const Treduce = Float64
136- r_promote (:: typeof (+ ), x:: FixedPoint{T} ) where {T} = Treduce (x)
137- r_promote (:: typeof (* ), x:: FixedPoint{T} ) where {T} = Treduce (x)
136+ if isdefined (Base, :r_promote )
137+ Base. r_promote (:: typeof (+ ), x:: FixedPoint{T} ) where {T} = Treduce (x)
138+ Base. r_promote (:: typeof (* ), x:: FixedPoint{T} ) where {T} = Treduce (x)
139+ else
140+ Base. promote_sys_size (:: Type{<:FixedPoint} ) = Treduce
141+ end
138142
139143reducedim_init (f:: typeof (identity),
140144 op:: typeof (+ ),
0 commit comments