Author Topic: [JAVA] Calculate Pi!  (Read 23580 times)

0 Members and 5 Guests are viewing this topic.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #15 on: November 09, 2005, 07:21:06 pm »
If infinity isn't a number, is e? I recently had a conversation with my math teacher about "the number e" (Euler's number)

e isn't infinite. It comes really close, seeing as how it's a constant.
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #16 on: November 09, 2005, 07:25:31 pm »
If infinity isn't a number, is e? I recently had a conversation with my math teacher about "the number e" (Euler's number)

e isn't infinite. It comes really close, seeing as how it's a constant.

I know it's not infinte, it's irrational. (1 + 1/n)^n as n -> infinity

The question is, do you consider "e" to be a number? I believe it is, just an irrational one.
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline Ender

  • x86
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #17 on: November 09, 2005, 08:11:01 pm »
How about pi?

Or (22 / 7) (isn't that supposed to be pi?)

Pi is an irrational number, meaning that it can't be expressed as int / int.
The question is, do you consider "e" to be a number? I believe it is, just an irrational one.

Of course it is. We say the word number when we refer to "real numbers." And irrational numbers are a subset of real numbers.

Infinity isn't a number simply because we can't put numbers to it. It's a concept that helps us understand things. e is used in calculations, however. It's paramount in calculus. Why? Derivative of ln x = 1/x.

Offline d&q

  • Hero Member
  • *****
  • Posts: 1427
  • I'm here.
    • View Profile
    • Site
Re: [JAVA] Calculate Pi!
« Reply #18 on: November 09, 2005, 08:15:40 pm »
Yes, because it can be expressed as an irrational number.

[Edit]: Whoops, didn't see Ender's post.

[Edit #2]: Actually, sometimes I refer to imaginary numbers as "a number". By imaginary, I mean a complex number with a coefficient of i.
« Last Edit: November 09, 2005, 08:17:52 pm by Deuce »
The writ of the founders must endure.

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #19 on: November 09, 2005, 08:35:43 pm »
Of course it is. We say the word number when we refer to "real numbers." And irrational numbers are a subset of real numbers.

This is my point. Usually, people refer to it as a letter.
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline d&q

  • Hero Member
  • *****
  • Posts: 1427
  • I'm here.
    • View Profile
    • Site
Re: [JAVA] Calculate Pi!
« Reply #20 on: November 09, 2005, 09:21:12 pm »
But it can be expressed as an irrational number, which is what I think counts. I also view i as a number, because it can be defined as the square root of -1.
The writ of the founders must endure.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [JAVA] Calculate Pi!
« Reply #21 on: November 09, 2005, 09:49:52 pm »
If infinity isn't a number, is e? I recently had a conversation with my math teacher about "the number e" (Euler's number)

Yes, it's just as much of a constant as Pi is. :P

You can round Pi and e; you can't round infinite.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [JAVA] Calculate Pi!
« Reply #22 on: November 09, 2005, 10:03:35 pm »
rounded to the nearest tenth is

Joe > Sidoh.

EDIT -
Nice, google </3 hotlinkers.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [JAVA] Calculate Pi!
« Reply #23 on: November 09, 2005, 10:07:48 pm »
rounded to the nearest tenth is

Joe > Sidoh.

EDIT -
Nice, google </3 hotlinkers.

That's not rounding.  It's like symbolizing a universe with a dot.  Don't be an idiot, Joe.  I guess that kind of is asking a lot of you though, isn't it? :P

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [JAVA] Calculate Pi!
« Reply #24 on: November 09, 2005, 10:18:12 pm »
If infinity isn't a number, is e? I recently had a conversation with my math teacher about "the number e" (Euler's number)

Yes.  e is a constant, infinity is not; for example, you could have one infinity larger than another.  Suppose:
sum[i = 0 to infinity] i / i2 + 1.  Obviously i summed from 0 to infinity would be infinity, but the denominator's infinity is larger, and so we call the series convergent.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [JAVA] Calculate Pi!
« Reply #25 on: November 09, 2005, 11:28:10 pm »
In case there's some question about whether i is a number:
- We know that x + 1 = 0 is a valid equation; however, if we only had regular "counting" numbers available, we couldn't solve it.  We would have to invent a concept of negative numbers, which we are all comfortable with .
- Then we have the equation x2 + 1 = 0.  It also had no solution without inventing the concept of imaginary numbers.
--> Imaginary numbers are negative numbers are both pretty abstract.  We can't see or touch either, but they seem to be numbers in a purely mathematical sense. 

Ok, so the next question is, is 0 a number?  It seems that 0 is just a placeholder.  Doesn't "0" represent the lack of a number, not an actual number?

If 0 is a number, is it even or odd?  What is the definition of even and odd that shows that 0 is even? Can it be shown that 0 also fits into the odd category?

Is the 0 in 2304 the same as the number 0?  How are they related?

What is x in 2x = 6? Is it a number?  It doesn't look like a number, but to anybody with more than a few years of math experience, it's immediately obvious that it's 3.  If x can be considered a number, is it possible that our definition of numbers isn't as clear as we think?

What about x in 0x = 6? Is x still a number?  Any number, real, rational, irrational, imaginary, etc. can be place in front of the x.  But when the number 0 is, x no longer has a value.  It seems like 0 isn't behaving as a number here. 

Or, is there a case for considering 1/0 to be a number?  Is the result infinite or undefined? Why? Is there a case for looking at it either way? 

I think this is the most important question of all:
How are 0 and infinite related?  Think about how to get the result of infinite in a finite equation.  The only way to get it is to use a 0.  This means that 0 and infinite are related, and that infinite can be derived from 0.  Because, as it was already discussed here, infinite isn't a number, does that show that 0 isn't either? 


By the way, most of these questions were inspired by or ripped from a variety of sources.  I post them here to provoke discussion, and maybe we'll all learn something. :)

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [JAVA] Calculate Pi!
« Reply #26 on: November 10, 2005, 01:30:25 am »
In case there's some question about whether i is a number:
- We know that x + 1 = 0 is a valid equation; however, if we only had regular "counting" numbers available, we couldn't solve it.  We would have to invent a concept of negative numbers, which we are all comfortable with .
- Then we have the equation x2 + 1 = 0.  It also had no solution without inventing the concept of imaginary numbers.
--> Imaginary numbers are negative numbers are both pretty abstract.  We can't see or touch either, but they seem to be numbers in a purely mathematical sense. 

Ok, so the next question is, is 0 a number?  It seems that 0 is just a placeholder.  Doesn't "0" represent the lack of a number, not an actual number?

If 0 is a number, is it even or odd?  What is the definition of even and odd that shows that 0 is even? Can it be shown that 0 also fits into the odd category?

Is the 0 in 2304 the same as the number 0?  How are they related?

What is x in 2x = 6? Is it a number?  It doesn't look like a number, but to anybody with more than a few years of math experience, it's immediately obvious that it's 3.  If x can be considered a number, is it possible that our definition of numbers isn't as clear as we think?

What about x in 0x = 6? Is x still a number?  Any number, real, rational, irrational, imaginary, etc. can be place in front of the x.  But when the number 0 is, x no longer has a value.  It seems like 0 isn't behaving as a number here. 

Or, is there a case for considering 1/0 to be a number?  Is the result infinite or undefined? Why? Is there a case for looking at it either way? 

I think this is the most important question of all:
How are 0 and infinite related?  Think about how to get the result of infinite in a finite equation.  The only way to get it is to use a 0.  This means that 0 and infinite are related, and that infinite can be derived from 0.  Because, as it was already discussed here, infinite isn't a number, does that show that 0 isn't either? 


By the way, most of these questions were inspired by or ripped from a variety of sources.  I post them here to provoke discussion, and maybe we'll all learn something. :)

Those are some pretty interesting points.

  It's funny how life is.  I used to hate math--it was my least favorite subject.  Just this year, I really started enjoying it.  It probably started when I showed some respect for the potential it had to do anything any other "tool" humans have.

Offline d&q

  • Hero Member
  • *****
  • Posts: 1427
  • I'm here.
    • View Profile
    • Site
Re: [JAVA] Calculate Pi!
« Reply #27 on: November 10, 2005, 04:31:17 pm »
In case there's some question about whether i is a number:
- We know that x + 1 = 0 is a valid equation; however, if we only had regular "counting" numbers available, we couldn't solve it.  We would have to invent a concept of negative numbers, which we are all comfortable with .
- Then we have the equation x2 + 1 = 0.  It also had no solution without inventing the concept of imaginary numbers.
--> Imaginary numbers are negative numbers are both pretty abstract.  We can't see or touch either, but they seem to be numbers in a purely mathematical sense. 

My argument for both infinity and i is their placement in the number system.

Number System:

All  Numbers-
      Imaginary Numbers- Numbers using the quantity i[/i(Complex Numbers). i defined as being the square root of -1.
      Real Numbers- A number that can be expressed on a number line.
           Irrational Numbers- A number that cannot be written as a result of the calculation: a/b.
           Rational Numbers- Can be written as a result of the calculation: a/b. This includes repeating decimals, such as 5/7 or 1/3.
                Integer- A number that is in the set of Natural numbers, 0, and the negatives of the natural numbers.
                    Whole Number- A number is in the set of Natural numbers, and 0.
                    Natural Number- A number in the set [1, 2, 3, 4, ...]

This is by no means the entire set of numbers, just what I think of when I thinking about what a particular value is. Since i fits, it's a number, and since ∞ does not, it is not a number.
               
Ok, so the next question is, is 0 a number?  It seems that 0 is just a placeholder.  Doesn't "0" represent the lack of a number, not an actual number?

I agree that zero is a lack of a number, but for practical uses, we have to regard it as a whole number.

If 0 is a number, is it even or odd?  What is the definition of even and odd that shows that 0 is even? Can it be shown that 0 also fits into the odd category?

An even number is a number that can be expressed as (2*x). Seeing that 2*0=0, 0 is even.


Is the 0 in 2304 the same as the number 0?  How are they related?

The 0 in 2304, means that in base 10, the second place, which is 10^1, has no value. 0 used in that text means that in whatever place it is, regardless of base, it means that that particular place has no value.


What is x in 2x = 6? Is it a number?  It doesn't look like a number, but to anybody with more than a few years of math experience, it's immediately obvious that it's 3.  If x can be considered a number, is it possible that our definition of numbers isn't as clear as we think?

x in 2x=6 is a variable. It is a symbol used to represent a quantity. In this case however, the hidden value "x", is 3. Which is a number.


What about x in 0x = 6? Is x still a number?  Any number, real, rational, irrational, imaginary, etc. can be place in front of the x.  But when the number 0 is, x no longer has a value.  It seems like 0 isn't behaving as a number here.

In this case, x cannot be defined, as we cannot divide by zero. 

Or, is there a case for considering 1/0 to be a number?  Is the result infinite or undefined? Why? Is there a case for looking at it either way?

I like to view it in baby terms. Lets say we have "1" of something. If we divide it upon 0 people, has it been divided at all, or has it been divided to 0 people, but just in unknown quantities? I had to look this up, and this is what wikipedia said:

Quote
Division: 0 / x = 0, for nonzero x. But x / 0 is undefined, because 0 has no multiplicative inverse, a consequence of the previous rule. For positive x, as y in x / y approaches zero from positive values, its quotient increases toward positive infinity, but as y approaches zero from negative values, the quotient increases toward negative infinity. The different quotients confirms that division by zero is undefined.

I think this is the most important question of all:
How are 0 and infinite related?  Think about how to get the result of infinite in a finite equation.  The only way to get it is to use a 0.  This means that 0 and infinite are related, and that infinite can be derived from 0.  Because, as it was already discussed here, infinite isn't a number, does that show that 0 isn't either? 

The only possible way I could think to produce ∞ from an equation would be x*0=0. But as that is undefined, I do not see any other way.

---------------

Whew! That was long post  :P.
The writ of the founders must endure.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [JAVA] Calculate Pi!
« Reply #28 on: November 10, 2005, 05:05:36 pm »
Sweet, I sparked a nice conversation by being an idiot!
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #29 on: November 10, 2005, 05:32:47 pm »
Also, pi is not only a number, but the 16th letter in the greek alphabet.


It's also a function.  Also, it's another (different) function.  So, pi is officially a letter, number, and two functions.  Hrm.