Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Other Topics > Science, Math, and Philosophy
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2005, 02:35 AM
fatdave fatdave is offline
Junior Member
 
Join Date: Nov 2004
Posts: 4
Default A numbers/equation/math-tricks request...

As I am trying to increase my skill in various forms of mathematics/calculus/trig/geometry/whatever, as well as in PHP, I would like to request some suggestions or questions for things for me to calculate, using PHP as my calculator.

It seems really redundant, as so many math functions are immediately available in PHP. However, the stringing together of functions in search of a result is really what I'm looking for.

So please, throw whatever you got at me. This could include statistical simulations, or word problems, or game theory, or whatever. Surprise me. Punish me (and you most likely will, as I forget lots of math "rules", except for maybe "Please My Dear Aunt Sally").

A very simple example is my post in this thread. I learned something new about both math and PHP.

I would prefer something that has at least a little bit of "math magic" in it, as opposed to straight-up boring equations.

Part of this is to teach me more PHP, part of it is to teach my about math, part of it is just for entertainment.
Reply With Quote
  #2  
Old 09-21-2005, 04:16 AM
Siegmund Siegmund is offline
Senior Member
 
Join Date: Feb 2005
Posts: 415
Default Re: A numbers/equation/math-tricks request...

Two suggestions from statistics that you might someday have a use for:

1) Generate your own normally distributed random numbers. [You can do this the easy way, using someone else's uniform random number generator and just learn how to use uniform random numbers to make normal random numbers - or you can learn how a good RNG like the Mersenne Twister works too.]

2) Of the two "textbook" ways of computing the standard deviation of a long series of numbers, one is subject to bad roundoff errors, and the other requires you to repeat the calculation from scratch every time you add a new datapoint to your list.
But there is a recurrence relation, that just takes the mean and standard deviation of the old list and the value of one additional datapoint, and updates the mean and standard deviation. (This one won't be much of a challenge for programming once you find the formula, but it's a formula that deserves more attention than it gets.)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.