# NUMBERS?

• (2 Pages)
• 1
• 2

## 27 Replies - 3042 Views - Last Post: 19 April 2012 - 05:44 AM

### #1 zedth2

Reputation: 2
• Posts: 121
• Joined: 14-September 09

# NUMBERS?

Posted 01 March 2012 - 11:25 AM

So I'm slowly coming to the closing of my first year of a CS major and I've taken on the project of writing an integer data type essentially. The way I am doing this requires me to rewrite functions for addition and subtraction and what not. But I've run into a little bit of a snag. I've looked online at proofs for addition and subtraction and the such but there's one thing that is bugging me, the one proof I can't find and that's the proof on numbers. I mean what is one or two or anything? The best conclusion I've come to is number is a data type and one would be the variable name and it's value would also happen to be one. But that doesn't seem enough, so what are numbers? Where's the proof for numbers? Is it all really just a layer of abstraction that we as a society just accept? Any advice, help, ideas, would be great.

Thank You

Is This A Good Question/Topic? 0

## Replies To: NUMBERS?

### #2 BenignDesign

• holy shitin shishkebobs

Reputation: 7459
• Posts: 12,061
• Joined: 28-September 07

## Re: NUMBERS?

Posted 01 March 2012 - 11:28 AM

Not sure where this should be, pumpkin, but the Lounge ain't it.

### #3 supersloth

• serial frotteur - RUDEST MEMBER ON D.I.C.

Reputation: 4665
• Posts: 28,487
• Joined: 21-March 01

## Re: NUMBERS?

Posted 01 March 2012 - 11:30 AM

i like his avatar though, let's see where this goes.

### #4 zedth2

Reputation: 2
• Posts: 121
• Joined: 14-September 09

## Re: NUMBERS?

Posted 01 March 2012 - 11:34 AM

I didn't know where it would actually go so I just put it here because it wasn't technically a programming question.

### #5 lordofduct

• I'm a cheeseburger

Reputation: 2667
• Posts: 4,786
• Joined: 24-September 10

## Re: NUMBERS?

Posted 01 March 2012 - 11:42 AM

numbers are counting. It a representation of how far was counted.

Addition is a finite count appended to a previous count.

Subtraction a finite count removed from a previous count.

If you want to know what counting is, it's the task we need to represent. There is no need to prove it, it's proof is the necessity of counting.

### #6 zedth2

Reputation: 2
• Posts: 121
• Joined: 14-September 09

## Re: NUMBERS?

Posted 01 March 2012 - 11:45 AM

Well if it really is just a necessity to count things then I would think it's a non natural thing, assuming it's a thing at all.

### #7 modi123_1

• Suitor #2

Reputation: 13493
• Posts: 53,900
• Joined: 12-June 08

## Re: NUMBERS?

Posted 01 March 2012 - 11:57 AM

Counting is entrenched in reality. That is to say if your reality has more than one object then you have counting. The recursion for a "numbers" proof hits your version of reality as the base limit.

### #8 jon.kiparsky

• Chinga la migra

Reputation: 10690
• Posts: 18,307
• Joined: 19-March 11

## Re: NUMBERS?

Posted 01 March 2012 - 12:07 PM

I'm no expert, but last I checked I saw people rooting numbers in sets: Zero is the empty set. Make a set which contains only that set, and that's one. Successive enclosing sets give you the natural numbers. From those, you can define addition. From addition, you can define the other operators. From subtraction, you can get negative numbers. From division, you can get to rational numbers, and so forth.

Dover press has got a lot of interesting titles on mathematical logic and set theory and number theory. That's the sort of thing that you'd need if you want to get down into the "what are numbers" questions, but I don't think that's what you really want to be spending your time on here.

In every language that I know of, numbers are an existing class. Are you just making a wrapper class for int, or what is it you're up to?

### #9 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12150
• Posts: 45,176
• Joined: 27-December 08

## Re: NUMBERS?

Posted 01 March 2012 - 01:07 PM

I'm going to move this to Computer Science.

• MrCupOfT

Reputation: 2298
• Posts: 9,535
• Joined: 29-May 08

## Re: NUMBERS?

Posted 01 March 2012 - 01:14 PM

When you writing an Integer type, are you referring to arbitry-precision numbers like BigInteger or the base type integer. (typicallly 16bits long)

### #11 sepp2k

• D.I.C Lover

Reputation: 2512
• Posts: 3,990
• Joined: 21-June 11

## Re: NUMBERS?

Posted 01 March 2012 - 01:29 PM

Talking about proving numbers makes no sense. You can prove boolean statements, things that are either true or false (except you can't prove them if they are false of course - unless you divide by zero). You can't prove numbers (the same way that you can't prove birds or chocolate). You can rigorously define them (for example using sets as jon.kiparsky suggested) and then prove properties about them. But you can't prove them. Proving is for statements, not things.

### #12 zedth2

Reputation: 2
• Posts: 121
• Joined: 14-September 09

## Re: NUMBERS?

Posted 01 March 2012 - 01:30 PM

Basically the way I'm accomplishing this is by representing the number as a string. All the algorithms I've built so far work on negative positive and decimal numbers.

### #13 Craig328

• I make this look good

Reputation: 2024
• Posts: 3,609
• Joined: 13-January 08

## Re: NUMBERS?

Posted 01 March 2012 - 01:31 PM

I once counted to 20 1/2.

• MrCupOfT

Reputation: 2298
• Posts: 9,535
• Joined: 29-May 08

## Re: NUMBERS?

Posted 01 March 2012 - 01:32 PM

From experience the string method is really slow.

### #15 zedth2

Reputation: 2
• Posts: 121
• Joined: 14-September 09

## Re: NUMBERS?

Posted 01 March 2012 - 01:41 PM

It's really just an experiment I'm doing on my own. Speed and how efficient it is really isn't an issue right now. But basically what started all this was I had to develop and algorithm to do subtraction then I went through and tried to prove it and then started looking at basic proofs which then lead to trying to find a proof for numbers.