Skip to content

Commit 4550d7d

Browse files
authored
Description NG decoration (#635)
1 parent 4199f4c commit 4550d7d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/src/manual/construction.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,19 @@ These are all examples of ill-formed intervals, resulting in the decoration `ill
133133

134134
### Guarantee
135135

136-
A *guarantee* is yet another label, independent of decorations, and not described by the IEEE Standard 1788-2015 specifications. Its purpose is to accomodate for Julia's extensive conversion and promotion system, while retaining reliability in computations. Specifically, an interval `x` constructed via [`interval`](@ref) satisfies `isguaranteed(x) == true`. However, if a call to `convert(::Type{<:Interval}, ::Real)` occurs, then the resulting interval `x` satisfies `isguaranteed(x) == false`.
136+
A *guarantee* is yet another label, independent of decorations, and not described by the IEEE Standard 1788-2015 specifications. Its purpose is to accomodate for Julia's extensive conversion and promotion system, while retaining reliability in computations. Specifically, an interval `x` constructed via [`interval`](@ref) satisfies `isguaranteed(x) == true`. However, if a call to `convert(::Type{<:Interval}, ::Real)` occurs, then the resulting interval `x` satisfies `isguaranteed(x) == false`, receiving the 'NG' (not guaranteed) label. For instance, consider the following examples:
137+
138+
```@repl construction
139+
convert(Interval{Float64}, 1.) # considered "not guaranteed" as this call can be done implicitly
140+
```
141+
142+
```@repl construction
143+
interval(1) # considered "guaranteed" as the user explicitly constructed the interval
144+
```
137145

138146
In contrast, a [`BareInterval`](@ref) can only be constructed via [`bareinterval`](@ref), it is not a subtype of `Real`, and there are no allowed conversion with `Number`. Thus, this interval type is always guaranteed.
139147

148+
140149
!!! danger
141150
A user interested in validated numerics should **always** have a resulting interval for which [`isguaranteed`](@ref) is `true`.
142151

0 commit comments

Comments
 (0)