JuliaMath / JuliaMath/IntervalSets.jl
Support broadcasting for `+`, `-`, `*`, `/` in 0.7?
- Dominant language
- Julia
- Stars
- 109
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
While it makes sense to _not_ override `+`, etc. to mean interval arithmetic, overriding broadcast notation seems less confusion. I'd propose that broadcasting is meant in the sense of set arithmetic: that is, `x in d1 .+ d2` iff there exists `s in d1` and `t in d2` such that `x == s+t`. In particular,
```julia
(1..2) .+ 1 == 2..3
(1..2) .+ (3..4) == 4..6
(1..2) .+ (3..5) == 4..7
3 .* (1..2) == 3..6
```
Less clear is what to do for discontinuous special functions:
```julia
exp.(1..2) == exp(1) .. exp(2)
sign.(1..2) == 1..1
sign.(-1 .. 1) # throws error? But how to catch this?
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.