Closed jagot closed 4 years ago
It's fixed (but requires ContinuumArrays.jl):
julia> using IntervalSets, QuasiArrays, ContinuumArrays
julia> r = Inclusion(0.0..70.0)
Inclusion(0.0..70.0)
julia> r.^2
BroadcastQuasiArray{Float64,1,typeof(Base.literal_pow),Tuple{Base.RefValue{typeof(^)},Inclusion{Float64,Interval{:closed,:closed,Float64}},Base.RefValue{Val{2}}}}(Base.literal_pow, (Base.RefValue{typeof(^)}(^), Inclusion(0.0..70.0), Base.RefValue{Val{2}}(Val{2}())))
julia> exp.(-r)
BroadcastQuasiArray{Float64,1,typeof(exp),Tuple{BroadcastQuasiArray{Float64,1,typeof(-),Tuple{Inclusion{Float64,Interval{:closed,:closed,Float64}}}}}}(exp, (BroadcastQuasiArray{Float64,1,typeof(-),Tuple{Inclusion{Float64,Interval{:closed,:closed,Float64}}}}(-, (Inclusion(0.0..70.0),)),))
julia> r.^2 .* exp.(-r)
BroadcastQuasiArray{Float64,1,typeof(*),Tuple{BroadcastQuasiArray{Float64,1,typeof(Base.literal_pow),Tuple{Base.RefValue{typeof(^)},Inclusion{Float64,Interval{:closed,:closed,Float64}},Base.RefValue{Val{2}}}},Base.Broadcast.Broadcasted{QuasiArrays.LazyQuasiArrayStyle{1},Nothing,typeof(exp),Tuple{BroadcastQuasiArray{Float64,1,typeof(-),Tuple{Inclusion{Float64,Interval{:closed,:closed,Float64}}}}}}}}(*, (BroadcastQuasiArray{Float64,1,typeof(Base.literal_pow),Tuple{Base.RefValue{typeof(^)},Inclusion{Float64,Interval{:closed,:closed,Float64}},Base.RefValue{Val{2}}}}(Base.literal_pow, (Base.RefValue{typeof(^)}(^), Inclusion(0.0..70.0), Base.RefValue{Val{2}}(Val{2}()))), Base.Broadcast.Broadcasted(exp, (BroadcastQuasiArray{Float64,1,typeof(-),Tuple{Inclusion{Float64,Interval{:closed,:closed,Float64}}}}(-, (Inclusion(0.0..70.0),)),))))
julia> (r.^2 .* exp.(-r))[0.1]
0.009048374180359597
r.^2
andexp.(-r)
work just fine, but their product bails, in two different ways, depending on whether ContinuumArrays is loaded or not.Environment: tomls.zip