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

0 Members and 2 Guests are viewing this topic.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [JAVA] Calculate Pi!
« Reply #30 on: November 10, 2005, 05:36:01 pm »
Sweet, I sparked a nice conversation by being an idiot!

You're actually pretty good at that, I've noticed. :P

Offline d&q

  • Hero Member
  • *****
  • Posts: 1427
  • I'm here.
    • View Profile
    • Site
Re: [JAVA] Calculate Pi!
« Reply #31 on: November 10, 2005, 06:15:18 pm »
rabbit: What do you mean Pi itself is a function?
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 #32 on: November 10, 2005, 07:11:42 pm »
rabbit: What do you mean Pi itself is a function?

Yeah, I don't quite get that either.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #33 on: November 11, 2005, 01:08:28 pm »
Quote
         Rational Numbers- Can be written as a result of the calculation: a/b. This includes repeating decimals, such as 5/7 or 1/3.
I may be wrong.  But, don't raitonal numbers have numbers that repeat after teh decimal?  Such as .3333333 ect.  But, 5/7 doesn't fit the description, so did you mean to put that in irrational?  Or am I just wrong?
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [JAVA] Calculate Pi!
« Reply #34 on: November 11, 2005, 01:15:13 pm »
Quote
         Rational Numbers- Can be written as a result of the calculation: a/b. This includes repeating decimals, such as 5/7 or 1/3.
I may be wrong.  But, don't raitonal numbers have numbers that repeat after teh decimal?  Such as .3333333 ect.  But, 5/7 doesn't fit the description, so did you mean to put that in irrational?  Or am I just wrong?
You're just wrong :-P

Rational numbers have numbers that repeat, as well as numbers that terminate (I forget what they're called), an integers, whole numbers, and natural numbers. 

Irrational numbers contain all rational numbers, and everything below it. 

Offline d&q

  • Hero Member
  • *****
  • Posts: 1427
  • I'm here.
    • View Profile
    • Site
Re: [JAVA] Calculate Pi!
« Reply #35 on: November 11, 2005, 06:23:47 pm »
Haha, 5/7 does repeat  :), there is as cool little pattern to know what any x/7 repeating decimal is.

@iago, Actually, I believe irrational numbers do not contain rational numbers, as irrational numbers cannot be written as "a/b".
The writ of the founders must endure.

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 #36 on: November 11, 2005, 07:00:41 pm »
@iago, Actually, I believe irrational numbers do not contain rational numbers, as irrational numbers cannot be written as "a/b".
You are correct, Real numbers are the set of rational numbers plus irrationational numbers, like the set of all numbers contains real and imaginary numbers, whcih are mutually exclusive.  ;)
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 #37 on: November 11, 2005, 08:03:24 pm »
@iago, Actually, I believe irrational numbers do not contain rational numbers, as irrational numbers cannot be written as "a/b".
You are correct, Real numbers are the set of rational numbers plus irrationational numbers, like the set of all numbers contains real and imaginary numbers, whcih are mutually exclusive.  ;)
Ah, you're right, I was mixing up irrational and real.  Stupid mistake :)

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #38 on: November 12, 2005, 12:58:35 pm »
The first pi function (lowercase pi, as we usually see it), is the number of primes less than the argument.
IE:


The second pi function (uppercase pi) is the expression for the process of Eratosthenes' Sieve (the multiplication of all factors of the argument).
IE:
« Last Edit: November 12, 2005, 02:08:17 pm by rabbit »

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 #39 on: November 12, 2005, 01:18:52 pm »
The first pi function (lowercase pi, as we usually see it), is the number of primes less than the argument.
IE:


The second pi function (uppercase pi) is the expression for the process of Eratosthenes' Sieve (the multiplication of all factors of the argument).
IE:

That seems off.  Number of primes less than 60 is not 46.7 billion.  They are: 2,3,5,7,11,13,17,19,23,27,31,37,41,43,47,53,57.

The multiplication of all positive integral factors of 12 = 1 * 2 * 3 * 4 * 6 = 144.

Unless I'm misunderstanding you.
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 rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #40 on: November 12, 2005, 02:07:35 pm »
I got it backwards!!  Whoops....fixing...

Fixed.  Even still, you should have noticed it was backwards considering I said the case of pi...and then had the different cases.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [JAVA] Calculate Pi!
« Reply #41 on: November 12, 2005, 02:31:02 pm »
But in any case, neither of those has anything to do with the constant Pi, doe they?

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #42 on: November 12, 2005, 04:27:20 pm »
Sure they do!  They are all represented by the Greek letter Pi.

Offline Tomcat

  • Newbie
  • *
  • Posts: 6
  • Hi! I'm new!
    • View Profile
Re: [JAVA] Calculate Pi!
« Reply #43 on: November 14, 2005, 08:10:25 pm »
e is like pi, I believe.  My ti-83 says it's approximately 2.71828182.  If by "like infinity" you mean not a number, then no, it's a number.  It's more like Pi in that they are both irrational numbers.  I would, however, relate it more closely to phi (phi is approximately 1.618...), because both were discovered frequently in nature.  Phi is a very interresting number.

-EDIT-
Quote
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.
x*0 equals 0.  It's defined as 0, isn't it?  anything * 0 is 0, or so I thought.
« Last Edit: November 14, 2005, 08:37:03 pm by Tomcat »

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [JAVA] Calculate Pi!
« Reply #44 on: November 14, 2005, 08:57:17 pm »
e is like pi, I believe.  My ti-83 says it's approximately 2.71828182.  If by "like infinity" you mean not a number, then no, it's a number.  It's more like Pi in that they are both irrational numbers.  I would, however, relate it more closely to phi (phi is approximately 1.618...), because both were discovered frequently in nature.  Phi is a very interresting number.

-EDIT-
Quote
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.
x*0 equals 0.  It's defined as 0, isn't it?  anything * 0 is 0, or so I thought.

I think those things have already been mentioned.  :P

x * 0 = 0 is one way to think of infinitie, but since you can't devide by zero due to mathematical laws, it's undefined, not infinite.