|
|
Line 10: |
Line 10: |
|
== definition of even & odd numbers == |
|
== definition of even & odd numbers == |
|
This may be frivolous/trivial, but since the task is to determine if an integer is odd or even, a simple definition of an odd/even number could be in order. |
|
This may be frivolous/trivial, but since the task is to determine if an integer is odd or even, a simple definition of an odd/even number could be in order. |
|
|
|
|
<br>The definition (below) defines an ODD NUMBER, and goes further than limiting the definition to an ODD INTEGER:
|
|
The definition (below) defines an ODD NUMBER, and goes further than limiting the definition to an ODD INTEGER: |
⚫ |
|
|
|
|
|
⚫ |
<br><br>An odd number is an integer of the form n=2k+1 where k is an integer. |
|
|
|
|
⚫ |
<br><br>Integers which are not odd are called even. |
|
|
⚫ |
|
⚫ |
<br><br>The above definition has the advantage that it isn't dependent upon its (say, internal binary) representation (or any base, for that matter), although that is one method to determine evenness/oddness. |
|
|
|
|
⚫ |
<br><br>I've also seen the definition that an odd number is an integer, that when divided by two, the absolute value of the remainder is (positive) unity. |
|
|
⚫ |
An ''odd number '' is an integer of the form '''n=2k+1 ''' where '''k ''' is an integer. |
⚫ |
<br> An even number ... the remainder is zero. |
|
|
|
|
|
⚫ |
Integers which are ''not odd '' are called ''even ''. |
|
|
|
|
|
|
|
⚫ |
The above definition has the advantage that it isn't dependent upon its (say, internal binary) representation (or any base, for that matter), although that is one method to determine evenness/oddness. |
|
|
|
|
⚫ |
I've also seen the definition that an odd number is an integer, that when divided by two, the absolute value of the remainder is (positive) unity. |
|
⚫ |
<br> For an even number ... the remainder is zero. |
|
|
|
|
<br>[[User:Gerard Schildberger|Gerard Schildberger]] 00:46, 16 March 2012 (UTC) |
|
<br>[[User:Gerard Schildberger|Gerard Schildberger]] 00:46, 16 March 2012 (UTC) |
|
|
|
|