Author Topic: It's PI Day!  (Read 4073 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Happy PI Day!  That's right, it's March 14 today!  Math and science nerds galore!

Post anything related to PI, Euler, etc.  Or did I mention PIES?!?!

NOTE: I'm just bored!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Great, a math pr0n thread. At least CP will be happy.
-C

 

Offline Stunaep

  • Thread Necrotech.... we bring the dead to life!
  • 210
It's the national Mothertongue day here. So **** PI.
"Post-counts are like digital penises. That's why I don't like Shrike playing with mine." - an0n
Bah. You're an admin, you've had practice at this spanking business. - Odyssey

 

Offline Tiara

  • Mrs. T, foo'!
  • 210
Its the national End of school - Beginning of a new weekend day over here :D
I AM GOD! AND I SHALL SMITE THEE!



...because I can :drevil:

 

Offline Stunaep

  • Thread Necrotech.... we bring the dead to life!
  • 210
oh yes, it's the end of school - beginning of the spring break day here. :ha:
"Post-counts are like digital penises. That's why I don't like Shrike playing with mine." - an0n
Bah. You're an admin, you've had practice at this spanking business. - Odyssey

 

Offline Styxx

  • 211
    • Hard Light Productions
Probably away. Contact through email.

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
:lol:

Here's some c++ programs I've been working on lately... one calculates Bernoulli numbers recursively and the other makes usage of the numbers in stirling's approximation for the logarithm of the gamma function (and applies anti logarithm to get exact gamma function value).

http://denebsystem.250free.com/bernoulli.exe
http://denebsystem.250free.com/lngamma.exe

Edit: Oh ya, just now added the factorial, double factorial, and beta function in there... easy to implement. :p
« Last Edit: March 14, 2003, 09:19:45 am by 34 »

 
:)  Nice on styxx.

"Your cynicism appauls me Collosus - I have ten thousand officers and crew willing to die for pants !"

"Go to red alert!"
"Are you sure sir? It does mean changing the bulb"

 

Offline Knight Templar

  • Stealth
  • 212
  • I'm a magic man, I've got magic hands.
CP should release PI today. Yes, Procyon Insurgency.  :p
Copyright ©1976, 2003, KT Enterprises. All rights reserved

"I don't want to get laid right now. I want to get drunk."- Mars

Too Long, Didn't Read

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
This has to be the best thread around in a while. :D unfortunately, my campaign isn't ready yet though. :( but soon...

Styxx: That thing is really neat. :yes: It must have taken the guy quite a while to do it though...

Anyway, hmm lets see, here is some neat stuff involving pi and bernoulli numbers:



can anyone prove them? ;7
« Last Edit: March 14, 2003, 12:42:30 pm by 296 »

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Quote
Originally posted by CP5670


:wtf: Which log base is that? :wtf:

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
eh...you know, the usual one, base e

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Quote
Originally posted by CP5670
eh...you know, the usual one, base e


Hmm... weird... I don't get those results when I sum it...

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
probably a typo on my part then, one minute...

hmm, it seems to work fine for me if I try it numerically; how are you calculating it?
« Last Edit: March 14, 2003, 01:48:54 pm by 296 »

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Quote
Originally posted by CP5670
probably a typo on my part then, one minute...

hmm, it seems to work fine for me if I try it numerically; how are you calculating it?


Code: [Select]

(java app)

sum = 0;
for (i = 1; i <= 9999999; i++)
sum += (i * Math.log(1 + 1/i) + 1/(2*i) - 1);


 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
The convergence is quite slow, but with that many terms you should still get quite a few digits. The value I am getting (and an approximate value of the expression on the right) is 0.3696692992460937; what are you getting there?

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
-9999998.30685282

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
I think just plain "log" stands for logarithm base 10.  You're supposed to use "ln" for natural logarithm (base e).  Java ought to have a ln function - if not, use log(...)/log(e).

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Quote
Originally posted by Goober5000
Possibly the program may be using log base 10.  I think you're supposed to use ln for natural logarithm (base e).  Java ought to have an ln function - if not, use log(...)/log(e).


Java's default log is base e.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Quote
-9999998.30685282


:wtf:

oh wait I think I know what is going on; the series is not absolutely convergent, and after some one million terms they start to oscillate between positive and negative values, so that may well be skewing the result. Try something like 50000 terms and see if that works any better.

Quote
I think just plain "log" stands for logarithm base 10. You're supposed to use "ln" for natural logarithm (base e). Java ought to have a ln function - if not, use log(...)/log(e).


:D This is one of the (many) cases of bad notations used in math. It seems that physicists and applied math guys use ln while pure math guys use log. Personally I like log much better; I mean, what the heck is ln supposed to mean when it is called a logarithm, and the e base is about the only one ever used anyway... :p :D
« Last Edit: March 14, 2003, 02:03:53 pm by 296 »