Skip to content

Commit 0e19b97

Browse files
committed
Fix docstrings
1 parent 76d7f0c commit 0e19b97

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/intervals/arithmetic/power.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,18 @@ See also: [`fastpow`](@ref), [`pown`](@ref) and [`fastpown`](@ref).
119119
# Examples
120120
121121
```jldoctest
122+
julia> using IntervalArithmetic
123+
122124
julia> setdisplay(:full);
123125
124126
julia> pow(bareinterval(2, 3), bareinterval(2))
125127
BareInterval{Float64}(4.0, 9.0)
126128
127129
julia> pow(interval(-1, 1), interval(3))
128-
Interval{Float64}(0.0, 1.0, trv)
130+
Interval{Float64}(0.0, 1.0, trv, true)
129131
130132
julia> pow(interval(-1, 1), interval(-3))
131-
Interval{Float64}(1.0, Inf, trv)
133+
Interval{Float64}(1.0, Inf, trv, true)
132134
```
133135
"""
134136
pow(x, y)
@@ -209,16 +211,18 @@ See also: [`fastpown`](@ref), [`pow`](@ref) and [`fastpow`](@ref).
209211
# Examples
210212
211213
```jldoctest
214+
julia> using IntervalArithmetic
215+
212216
julia> setdisplay(:full);
213217
214218
julia> pown(bareinterval(2, 3), 2)
215219
BareInterval{Float64}(4.0, 9.0)
216220
217221
julia> pown(interval(-1, 1), 3)
218-
Interval{Float64}(-1.0, 1.0, com)
222+
Interval{Float64}(-1.0, 1.0, com, true)
219223
220224
julia> pown(interval(-1, 1), -3)
221-
Interval{Float64}(-Inf, Inf, trv)
225+
Interval{Float64}(-Inf, Inf, trv, true)
222226
```
223227
"""
224228
function pown(x::BareInterval{T}, n::Integer) where {T<:NumTypes}

src/intervals/exact_literals.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ julia> 0.5 * interval(1)
3434
Interval{Float64}(0.5, 0.5, com, false)
3535
3636
julia> ExactReal(0.5) * interval(1)
37-
Interval{Float64}(0.5, 0.5, com, false)
37+
Interval{Float64}(0.5, 0.5, com, true)
3838
3939
julia> setdisplay(:infsup);
4040
@@ -218,13 +218,13 @@ julia> f(x) = 1.2 * x + 0.1
218218
f (generic function with 1 method)
219219
220220
julia> f(interval(1, 2))
221-
[1.29999, 2.5]_com_NG
221+
[1.3, 2.5]_com_NG
222222
223223
julia> @exact g(x) = 1.2 * x + 0.1
224224
g (generic function with 1 method)
225225
226226
julia> g(interval(1, 2))
227-
[1.29999, 2.5]_com
227+
[1.3, 2.5]_com
228228
229229
julia> g(1.4)
230230
1.78

0 commit comments

Comments
 (0)