Test integerness: Difference between revisions

removing extra-credit and making it a task requirement
m (make a separate line for the formula)
(removing extra-credit and making it a task requirement)
Line 1:
{{draft task}}
 
Given a real numeric, possibly complex value, test whether or not it is an [[wp:integer|integer]].
 
To be clear, we're not talking about whether the number is stored with the specific data type for integers, but instead we want to test whether there exists an integer with the exact same value. In other words, we want to test for integerness in the mathematical sense, not as a data type.
 
For extra credit, extend the test to complex numbers. Remember that:
 
<math>\mathbf{Z}\subset\mathbf{C}</math>.
 
 
1,934

edits