Algosim documentation: ∋

∋ (contains as member)

Tests for set membership.

Syntax

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 ContainsAsElement function.

Examples

A ≔ {−1, 0, 1}
{1, −1, 0}
A ∋ sin(π)
true

See also