The following results are not surprising.
This returns false because the box is not an exact zero.
>
|
|
Clearly, is contained in the following box.
>
|
|
That zero belongs to the next box is due to the box being closed.
>
|
|
>
|
|
This returns false because the box is not an exact box.
>
|
|
A box is not finite despite having a finite center if its radius is infinite.
>
|
|
Negative infinities are also not "finite".
>
|
|
Undefined values for the center also cause the IsFinite method to return false.
>
|
|
The IsExact method checks that a RealBox object represents its center exactly in the sense that that radius is equal to .
>
|
|
>
|
|
Whether a RealBox object is exact may depend not only on the passed radius (which is by default), but also on the representability of the center as an exact float. In these examples, the rational number can be represented exactly as a float, while cannot.
Notice that IsInteger returns true only if the RealBox is exact in the sense that the radius is equal to .
>
|
|
Of course, it returns false for (exact) non-integral values.
>
|
|
The following returns true because the default user-specified radius of zero results in an ultimate radius that is very small relative to the size of the center.
>
|
|
| (29) |
Here, the radius is larger than the center, so the box represents a set containing non-positive values.
>
|
|
Similar results are obtained for testing whether a box is "negative".
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
Note the result for a negative zero:
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
Because neither the center nor radius can be represented exactly in floating point, the following returns true.
>
|
|
Similarly, we have the following result.
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|