Method on @infsup: setxor (A, B)
Method on @infsup: [C, C1, C2] = setxor (A, B)

Build the symmetric difference of intervals A and B.

With three output arguments, return intervals C1 and C2 such that C1 and C2 are enclosures of disjoint sets whose union is enclosed by interval C.

Accuracy: The result is a tight enclosure.

x = infsup (1, 3);
y = infsup (2, 4);
[z, z1, z2] = setxor (x, y)
  ⇒
    z = [1, 4]
    z1 = [1, 2]
    z2 = [3, 4]

See also: @infsup/intersect, @infsup/union, @infsup/setdiff.

Package: interval