View Single Post
  #1  
Old 07-27-2007, 04:31 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Sequences and Series

Hurrah for math functions that will most likely be of no use at all.

PHP Code:
public function arithSeq(term, firstterm, d) {
  return 
firstterm + ( ( term - 1 ) * ( d ) );
}
public function 
geomSeq(term, firstterm, r) {
  return ( 
firstterm ) * ( ( r ) ^ ( term - 1 ) );
}
public function 
arithSeries(term, firstterm, d) {
  
temp.termn = arithSeq(term, firstterm, d);
  return ( 
term / 2 ) * ( firstterm + temp.termn );
}
public function 
geomSeries(term, firstterm, r) {
  return ( 
firstterm - ( firstterm * ( r ^ term ) ) ) / ( 1 - r );
} 
(I was bored)
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote