Operators > Boolean Operators > Example: Using the Element Of Operator
  
Example: Using the Element Of Operator
1. Use numeric and symbolic evaluation to test if 4i is a member of the set of complex numbers.
Click to copy this expression
Click to copy this expression
2. Use numeric and symbolic evaluation to test if -3/4 is a member of the set of rational numbers.
Click to copy this expression
Click to copy this expression
As expected, the numeric evaluation fails when number set ℚ is specified.
3. Use numeric and symbolic evaluation to test if 2 is a member of the set of real numbers.
Click to copy this expression
Click to copy this expression
4. Use numeric and symbolic evaluation to test if 1.3 is a member of the set of integer numbers.
Click to copy this expression
Click to copy this expression
5. Show that exact floating point representations of integers are treated by symbolic evaluation as rational numbers.
Click to copy this expression
Click to copy this expression
The numeric evaluation fails because only symbolic evaluation is allowed when set ℚ is specified.
The symbolic evaluation fails because testing a floating point number for membership in ℚ is not defined.
Click to copy this expression
Click to copy this expression
The numeric evaluation fails because only symbolic evaluation is allowed when set ℚ is specified.
The symbolic evaluation passes because when set ℚ is specified the exact floating point representation 10.0 of integer 10 is treated as a rational number and thus it passes the test for membership in ℚ.