flat assembler
Message board for the users of flat assembler.

Index > Heap > Is 1 even or odd?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Is 1 even or odd? Razz
Post 13 Mar 2014, 18:10
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
typedef wrote:
Is 1 even or odd? Razz
1 is odd because gives the rest 1 when you divide it modulo 2. Wink
Post 13 Mar 2014, 18:25
View user's profile Send private message Visit poster's website Reply with quote
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
Post 13 Mar 2014, 18:27
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
typedef,

Please define «1», «even» and «odd».
Post 13 Mar 2014, 19:01
View user's profile Send private message Reply with quote
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?
Post 13 Mar 2014, 19:08
View user's profile Send private message Reply with quote
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.
Post 13 Mar 2014, 19:31
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
Is pi odd or even?
Post 13 Mar 2014, 23:56
View user's profile Send private message Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 724
tthsqe
Quote:

Is pi odd or even?

No.


Typedef, why would you ask such a trivial question?
Post 14 Mar 2014, 00:48
View user's profile Send private message Reply with quote
comrade



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


Neither, it's an irrational number.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Mar 2014, 01:46
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
Is pie odd or even?
Post 14 Mar 2014, 01:59
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
revolution,

Please define «pie», «odd» and «even». Wink
Post 14 Mar 2014, 03:22
View user's profile Send private message Reply with quote
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. Wink
Post 14 Mar 2014, 08:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
Post 14 Mar 2014, 08:13
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
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?
Post 14 Mar 2014, 08:15
View user's profile Send private message Visit poster's website Reply with quote
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
Post 14 Mar 2014, 08:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
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.
Post 14 Mar 2014, 11:52
View user's profile Send private message Visit poster's website Reply with quote
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. Razz
Post 14 Mar 2014, 20:56
View user's profile Send private message Reply with quote
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. Razz
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).
Post 14 Mar 2014, 23:08
View user's profile Send private message Reply with quote
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. Razz


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

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 14 Mar 2014, 23:58
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
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. Razz
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.
Post 17 Mar 2014, 20:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.