@@ -94,14 +94,14 @@ for f in [+, -, *, \, /, ^]
9494end
9595
9696promote_symtype (:: typeof (rem2pi), T:: Type{<:Number} , mode) = T
97- Base. rem2pi (x:: Symbolic , mode:: Base.RoundingMode ) = term (rem2pi, x, mode)
97+ Base. rem2pi (x:: Symbolic{<:Number} , mode:: Base.RoundingMode ) = term (rem2pi, x, mode)
9898
9999for f in monadic
100100 if f in [real]
101101 continue
102102 end
103103 @eval promote_symtype (:: $ (typeof (f)), T:: Type{<:Number} ) = promote_type (T, Real)
104- @eval (:: $ (typeof (f)))(a:: Symbolic ) = term ($ f, a)
104+ @eval (:: $ (typeof (f)))(a:: Symbolic{<:Number} ) = term ($ f, a)
105105end
106106
107107Base.:* (a:: AbstractArray , b:: Symbolic{<:Number} ) = map (x-> x* b, a)
@@ -112,7 +112,7 @@ for f in [identity, one, zero, *, +, -]
112112end
113113
114114promote_symtype (:: typeof (Base. real), T:: Type{<:Number} ) = Real
115- Base. real (s:: Symbolic ) = islike (s, Real) ? s : term (real, s)
115+ Base. real (s:: Symbolic{<:Number} ) = islike (s, Real) ? s : term (real, s)
116116
117117# # Booleans
118118
@@ -148,5 +148,5 @@ promote_symtype(::typeof(ifelse), _, ::Type{T}, ::Type{S}) where {T,S} = Union{T
148148Base. @deprecate cond (_if, _then, _else) ifelse (_if, _then, _else)
149149
150150# Specially handle inv and literal pow
151- Base. inv (x:: Symbolic ) = Base.:^ (x, - 1 )
152- Base. literal_pow (:: typeof (^ ), x:: Symbolic , :: Val{p} ) where {p} = Base.:^ (x, p)
151+ Base. inv (x:: Symbolic{<:Number} ) = Base.:^ (x, - 1 )
152+ Base. literal_pow (:: typeof (^ ), x:: Symbolic{<:Number} , :: Val{p} ) where {p} = Base.:^ (x, p)
0 commit comments