Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Sequences and Series (https://forums.graalonline.com/forums/showthread.php?t=75881)

coreys 07-27-2007 04:31 AM

Sequences and Series
 
Hurrah for math functions that will most likely be of no use at all. :)

PHP Code:

public function arithSeq(termfirsttermd) {
  return 
firstterm + ( ( term ) * ( ) );
}
public function 
geomSeq(termfirsttermr) {
  return ( 
firstterm ) * ( ( ) ^ ( term ) );
}
public function 
arithSeries(termfirsttermd) {
  
temp.termn arithSeq(termfirsttermd);
  return ( 
term ) * ( firstterm temp.termn );
}
public function 
geomSeries(termfirsttermr) {
  return ( 
firstterm - ( firstterm * ( term ) ) ) / ( );


(I was bored)

Twinny 07-27-2007 08:58 AM

Quote:

Originally Posted by coreys (Post 1334671)
Hurrah for math functions that will most likely be of no use at all. :)

PHP Code:

boffin stuff 

(I was bored)

*curls up and sucks thumb*

The sad bit it that I actually remember that stuff.... I still hate maths though.

Chompy 07-27-2007 12:42 PM

Bah, I usually do that on Mal :( You uploaded those on mal? I remember I uploaded the fibonocci(?) code.. hmm

edit: oh, here it is

PHP Code:

public function fib(n) {
  return (((
1+5^0.5)/2)^- ((1-5^0.5)/2)^n) / (((1+5^0.5)/2) - ((1-5^0.5)/2));


But that one isn't advanced at all :(

cbk1994 07-27-2007 02:55 PM

Quote:

Originally Posted by Chompy (Post 1334737)
PHP Code:

return (((1+5^0.5)/2)^- ((1-5^0.5)/2)^n) / (((1+5^0.5)/2) - ((1-5^0.5)/2)); 


:cry:

Angel_Light 07-27-2007 02:59 PM

*fetal position* ._.

coreys 07-27-2007 08:07 PM

Yeah I saw the fibbancci sequence on Mal's math class. I put these in there, Zeo. lol

When I did the fibbonacci sequence, I used a for loop, though, but that's OBVIOUSLY more effective. XD
It's definitely more advanced than mine at least.
P.S. Get on Maloria more. D:

Chompy 07-29-2007 09:18 AM

Quote:

Originally Posted by coreys (Post 1334818)
Yeah I saw the fibbancci sequence on Mal's math class. I put these in there, Zeo. lol

When I did the fibbonacci sequence, I used a for loop, though, but that's OBVIOUSLY more effective. XD
It's definitely more advanced than mine at least.
P.S. Get on Maloria more. D:

Oh sorry I haven't been on >_< I got a virus last night that wiped my system (corrupted it)..
kinda annoying, had to reinstall windows. Finnaly got it to work this morning.. :(

Lost about 310 gb of data :(

coreys 07-29-2007 08:14 PM

Daaayuuum that stinks
But I understand...I'll..attempt to continue with what Stan started ._.

Any who, I don't suppose anyone knows any good uses for these functions, do they? XD

Chompy 07-29-2007 08:17 PM

Quote:

Originally Posted by coreys (Post 1335279)
Daaayuuum that stinks
But I understand...I'll..attempt to continue with what Stan started ._.

Any who, I don't suppose anyone knows any good uses for these functions, do they? XD

Uhmm, neither do I xD

coreys 07-29-2007 08:27 PM

Well...a geometric series could be used for exponential growth. So if you wanted to use it for some kind of player stat (exp needed to level up, strength, etc etc) you could. Arithmetic Series could be used in similar circumstances as well. And both of those need the geometric and arithmetic sequences to work. So whoo, it can be used.

Edit: Btw, Chompy, what GMT time zone are you in, and what hours could you be on? So that I know when to be on to find you.

Chompy 07-29-2007 11:31 PM

Quote:

Originally Posted by coreys (Post 1335287)
Well...a geometric series could be used for exponential growth. So if you wanted to use it for some kind of player stat (exp needed to level up, strength, etc etc) you could. Arithmetic Series could be used in similar circumstances as well. And both of those need the geometric and arithmetic sequences to work. So whoo, it can be used.

Edit: Btw, Chompy, what GMT time zone are you in, and what hours could you be on? So that I know when to be on to find you.

gmt+1 :)

coreys 07-30-2007 12:27 AM

GMT-6...7 hours apart :< I HAVE TO LOVE YOU FROM AFAR


All times are GMT +2. The time now is 08:06 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.