∈ (element of)
Tests for set membership.
Syntax
-
a ∈ A
-
a
is any object -
A
is a set
-
Description
If a
is any object and A
a set, then a ∈ A
returns true
iff a
is an element of A
.
If the cardinality of A
is reasonably small, floating-point values are compared individually with epsilon. However, if the cardinality is very large, a different algorithm may be used to improve performance, which may not be epsilon-based.
The ∈
operator is implemented by the ElementOf
function.
Examples
A ≔ {−1, 0, 1}
{1, −1, 0}
sin(π) ∈ A
true
See also
-
Set operators (list)