Skip to content

Commit

Permalink
Disable divisor for mod to be an interval
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana committed May 27, 2022
1 parent ea00b23 commit 439723f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/intervals/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,5 @@ function mod(x::Interval, y::Real)
fl = floor(division)
fl.lo < fl.hi ? Interval(zero(y), y) : y * (division - fl)
end

mod(x:T, y::Interval) where T = throw(ArgumentError("mod not defined for interval as divisor `y`"))

0 comments on commit 439723f

Please sign in to comment.