can non integers (read #'s with decimals) be even/odd

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: Tiamat
I dont care enough to maintain this :)

you can say what you want, but it is not exactly equal. By using decimals you are bringing up the idea of precision. To simplify your problem, you can say that "reasonably, my measurement is equal to an integer" but that is a relaxing assumption so that you can continue on. Depending on your circumstances, you cannot make such relaxations.

Our arguement is somewhat similar to :
You say that $1.01 is 1$ and then pay me only 1$
My stance is that I want my damn penny!

This is of course, an exaggeration.

So, in the end, I am a nit-picker (sp?)

You're making a pretty strong assumption yourself that "using decimals brings up the idea of precision" in all contexts If you're just talking about integers and real numbers in general, I would usually assume that "1", "1.0", "1.000", and "1.000..." are all equal (in that they refer to the same point on the real number line). However, technically, the latter three are not integers; they are real numbers that happen to be equal to an integer.

Unless you are specifically dealing with a situation where significant figures are important, the normal convention is that you can assume trailing zeroes after a real number -- for example, "1.65" is the same as "1.65000..." If you really mean "an undefined real number greater than 1.64000... and smaller than 1.7000...", you need to use notation like [1.600...,1.700...], or otherwise provide more information. Otherwise, it is unclear -- you might actually mean [1.6450...,1.750...] (typical rounding as in measurement), or even (1.650...,1.70...] (truncation).

re: the initial question -- 'even'/'odd' in the ({...-3,-1,1,3,5,...} versus {...-4,-2,0,2,4,6,...}) sense is only defined for integers.
 

Kelemvor

Lifer
May 23, 2002
16,928
8
81
"1" has the same numerical value as "1.000" but they are not the same number. "1" is an integer and "1.000" is a decimal. Integers can be assigned even or odd but decimals cannot.