File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ function nthroot(a::Interval{T}, n::Integer) where T
375
375
end
376
376
377
377
"""
378
- Calculate `x::Interval mod y::Real`, limited by ` y != 0 `.
378
+ Calculate `x::Interval mod y::Real` where y != zero(y) and y is not inteval `.
379
379
"""
380
380
function mod (x:: Interval , y:: Real )
381
381
@assert y != zero (y) """ mod(x::Interval, y::Real)
@@ -389,4 +389,5 @@ is currently implemented only for a strictly positive or negative divisor y."""
389
389
end
390
390
end
391
391
392
- mod (x: T, y:: Interval ) where T = throw (ArgumentError (" mod not defined for interval as divisor `y`" ))
392
+ mod (x:: Interval , y:: Interval ) where T = throw (ArgumentError (" mod not defined for interval as divisor `y`" ))
393
+ mod (x:: Real , y:: Interval ) where T = throw (ArgumentError (" mod not defined for interval as divisor `y`" ))
Original file line number Diff line number Diff line change 472
472
@test mod (x, - 0.5 ) == - 0.5 .. 0
473
473
474
474
# TODO - implement mod for two intervals
475
- @test_throws TypeError mod (1 .. 2 , 1.4 .. 1.5 )
475
+ @test_throws ArgumentError mod (1 .. 2 , 1.4 .. 1.5 )
476
+ @test_throws ArgumentError mod (1.0 , 1.4 .. 1.5 )
476
477
end
You can’t perform that action at this time.
0 commit comments