You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Correct and complete reference to the standard for boolean operations
* Update Ill-formed intervals doc
* Include a comment on hash in the philosophy
* Fix typo
* Change display of ill-formed intervals to NaI
* Remove big splat to fix tests
Copy file name to clipboardExpand all lines: docs/src/manual/construction.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,11 +126,16 @@ interval(2, 1)
126
126
interval(NaN)
127
127
```
128
128
129
-
These are all examples of ill-formed intervals, resulting in the decoration `ill`.
129
+
These are all examples of ill-formed intervals,
130
+
also known as `NaI`, resulting in the decoration `ill`.
130
131
131
-
!!! danger
132
-
The decoration `ill` is an indicator that an error has occured. Therefore, any interval marked by this decoration cannot be trusted and the code needs to be debugged.
132
+
Similarly to the floating point `NaN`,
133
+
all boolean operations on an ill-formed interval return `false`.
133
134
135
+
!!! danger
136
+
The decoration `ill` is an indicator that an error has occured.
137
+
Therefore, when an ill-formed interval is created, a warning is raised.
138
+
Any interval marked by this decoration cannot be trusted and the code needs to be debugged.
Copy file name to clipboardExpand all lines: docs/src/philosophy.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,24 @@ because our intervals are always closed,
155
155
while the result of `setdiff` can be open.
156
156
157
157
158
+
## `hash`
159
+
160
+
The function `hash` is the only case where we do not define the value of
161
+
a function based on its interval extension.
162
+
163
+
`hash` return a single hash, and not an interval bounding the image
164
+
of the function.
165
+
166
+
```julia
167
+
julia>hash(interval(1, 2))
168
+
0xda823f68b9653b1a
169
+
170
+
julia>hash(1.2) inhash(interval(-10, 10))
171
+
false
172
+
```
173
+
174
+
This is justified as `hash` is not a mathematical function,
175
+
and julia requires that `hash` returns a `UInt`.
158
176
159
177
# Summary
160
178
@@ -165,3 +183,4 @@ while the result of `setdiff` can be open.
165
183
| Boolean operations |`==`, `<`, `<=`, `iszero`, `isnan`, `isinteger`, `isfinite`| Error if the result can not be guaranteed to be either `true` or `false`| See [`isequal_interval`](@ref) to test equality of intervals, and [`isbounded`](@ref) to test the finiteness of the elements |
166
184
| Set operations | `in`, `issubset`, `isdisjoint`, `issetequal`, `isempty`, `union`, `intersect` | Always error | Use the `*_interval` function instead (e.g. [`in_interval`](@ref))
0 commit comments