flat assembler
Message board for the users of flat assembler.

 Index > Heap > Is 1 even or odd? Goto page 1, 2  Next
Author
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Is 1 even or odd?
13 Mar 2014, 18:10
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
typedef wrote:
Is 1 even or odd?
1 is odd because gives the rest 1 when you divide it modulo 2.
13 Mar 2014, 18:25
sleepsleep

Joined: 05 Oct 2006
Posts: 8864
Location: ˛　　　　　　　　　　　　　　　　　　　　　　　　　　　　　⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
http://mathworld.wolfram.com/EvenNumber.html
even numbers are integrally divisible by two

1/2 = 0.5
13 Mar 2014, 18:27
baldr

Joined: 19 Mar 2008
Posts: 1651
baldr
typedef,

Please define «1», «even» and «odd».
13 Mar 2014, 19:01
sleepsleep

Joined: 05 Oct 2006
Posts: 8864
Location: ˛　　　　　　　　　　　　　　　　　　　　　　　　　　　　　⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
are integer and float is how we zoom in and zoom out inside numbers?
13 Mar 2014, 19:08
baldr

Joined: 19 Mar 2008
Posts: 1651
baldr
sleepsleep,

Floats are discrete too (I mean finite precision floats as of being opposite to rationals and real numbers). And yes, integers and floats are approximates of the concept of a number.
13 Mar 2014, 19:31
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17247
revolution
Is pi odd or even?
13 Mar 2014, 23:56
tthsqe

Joined: 20 May 2009
Posts: 724
tthsqe
Quote:

Is pi odd or even?

No.

Typedef, why would you ask such a trivial question?
14 Mar 2014, 00:48

Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
revolution wrote:
Is pi odd or even?

Neither, it's an irrational number.

_________________
14 Mar 2014, 01:46
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17247
revolution
Is pie odd or even?
14 Mar 2014, 01:59
baldr

Joined: 19 Mar 2008
Posts: 1651
baldr
revolution,

Please define «pie», «odd» and «even».
14 Mar 2014, 03:22
tthsqe

Joined: 20 May 2009
Posts: 724
tthsqe
I found the definitive proof! http://www.wolframalpha.com/input/?i=EvenQ%5BPi%5D+%7C%7C+OddQ%5BPi%5D+
If wlofram alpha says no, the answer has got to be no.
14 Mar 2014, 08:10
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17247
revolution
14 Mar 2014, 08:13
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17247
revolution
tthsqe wrote:
If wlofram alpha says no, the answer has got to be no.
I thought that honour went to Google? Or is that now Bing? Yahoo!? Wikipedia? All of the above?
14 Mar 2014, 08:15
tthsqe

Joined: 20 May 2009
Posts: 724
tthsqe
One thing of which these engines don't have a firm grasp is human language. For example:
How many numbers n are there between 1 and 1000 such that both n and n^2-2 are prime?
Fail: http://www.wolframalpha.com/input/?i=How+many+numbers+n+are+there+between+1+and+1000+such+that+both+n+and+n%5E2-2+are+prime%3F

I'll eat my hat if you can get an engine to parse that correctly.
Where as we can get the answer easily with machine language
http://www.wolframalpha.com/input/?i=Length%5BSelect%5BRange%5B1000%5D%2CPrimeQ%5B%23%5D%26%26PrimeQ%5B%23%5E2-2%5D%26%5D%5D
14 Mar 2014, 08:52
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17247
revolution
The problem is that you didn't properly specify how you wanted to interpret "between". Is that inclusively or exclusively? This is why human language is tricky to parse and interpret, because it is context sensitive and ambiguous.
14 Mar 2014, 11:52
ManOfSteel

Joined: 02 Feb 2005
Posts: 1154
ManOfSteel
A number is odd when it's not even. A number is even when it can be divided evenly into groups of two and when it ends with any of these: 0, 2, 4, 6 and 8.

1 is an odd number.

Also, the concept of parity only applies to integers, so asking about π doesn't even make sense.

revolution wrote:
Is pie odd or even?

'Pie' is neither since it's not even a number, but a type of pastry.
14 Mar 2014, 20:56
baldr

Joined: 19 Mar 2008
Posts: 1651
baldr
ManOfSteel wrote:
revolution wrote:
Is pie odd or even?
'Pie' is neither since it's not even a number, but a type of pastry.
Mathematicians like to extend useful abstractions to new areas. Pie is even if it can be divided in two equal parts, odd otherwise (exact methods of "division" and "equality" are dependent on "pie" concept).
14 Mar 2014, 23:08
JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
ManOfSteel wrote:
'Pie' is neither since it's not even a number, but a type of pastry.

If it is not even a number, it should be odd a number. Isn't it?

_________________
14 Mar 2014, 23:58
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
baldr wrote:
ManOfSteel wrote:
revolution wrote:
Is pie odd or even?
'Pie' is neither since it's not even a number, but a type of pastry.
Mathematicians like to extend useful abstractions to new areas. Pie is even if it can be divided in two equal parts, odd otherwise (exact methods of "division" and "equality" are dependent on "pie" concept).
Then is 3 even? It can be divided into two even parts: 3/2 and 3/2.

Even and odd are only defined in terms of integers, with the definition being "p is even if p = 0 mod 2". Since modular arithmetic is only defined over the integers and even/odd are defined in terms of modular arithmetic, even and odd are only defined over the integers.
17 Mar 2014, 20:08
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsCompiler InternalsIDE DevelopmentOS ConstructionNon-x86 architecturesHigh Level LanguagesProgramming Language DesignProjects and IdeasExamples and Tutorials Other----------------FeedbackHeapTest Area
Goto page 1, 2  Next

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou can attach files in this forumYou can download files in this forum