@@ -10,7 +10,7 @@ import Base: ==, <, <=, -, +, *, /, ~, isapprox,
10
10
zero, oneunit, one, typemin, typemax, realmin, realmax, eps, sizeof, reinterpret,
11
11
float, trunc, round, floor, ceil, bswap,
12
12
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
14
14
if isdefined (Base, :rem1 )
15
15
import Base: rem1
16
16
end
@@ -133,8 +133,12 @@ sizeof(::Type{T}) where {T <: FixedPoint} = sizeof(rawtype(T))
133
133
134
134
# Promotions for reductions
135
135
const 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
138
142
139
143
reducedim_init (f:: typeof (identity),
140
144
op:: typeof (+ ),
0 commit comments