|
-
Aug 29th, 2003, 03:58 AM
#1
Need this formula re-arranged
Hi folks, it's not like me to post questions, but here we go....
I've got this formula:
Code:
T = N * (B + [(N-1) * E]/2 )
Unfortunately the variable I want to calculate is N, and no matter what I do I can't seem to get N on it's own
How should it be?
N = ????
-
Aug 29th, 2003, 05:31 AM
#2
Askthis in the math forum ,they might solve it within 5 min or so.
-
Aug 29th, 2003, 06:11 AM
#3
Addicted Member
is E the exponential function?
-
Aug 29th, 2003, 06:11 AM
#4
So Unbanned
n=+/- (sqr(8*e*t+(2*b-e)^2) - 2*b +e) / 2*e
Last edited by DiGiTaIErRoR; Aug 29th, 2003 at 06:17 AM.
-
Aug 29th, 2003, 06:33 AM
#5
Frenzied Member
I think that comes from rearranging the formula to
0= n^2E +n(2B-E) -2T
then solving the quadratic equation.
Am I right?
I used to be able to do these, now Ive turned a bit thick from lack of practice
-
Aug 29th, 2003, 06:38 AM
#6
Originally posted by DiGiTaIErRoR
n=+/- (sqr(8*e*t+(2*b-e)^2) - 2*b +e) / 2*e
perfect!!
I've got no idea how you found it, but it returns the right answer for all my test cases.
Thanks DiGiTaIErRoR
-
Aug 29th, 2003, 07:11 AM
#7
Frenzied Member
Originally posted by si_the_geek
perfect!!
I've got no idea how you found it, but it returns the right answer for all my test cases.
VB Code:
T = N * (B + [(N-1) * E]/2 )
T = NB + N * ([(N-1) * E]/2 )
T = NB + [(N ^2 - N) * E] /2
2T = 2NB + (N ^2 - N) * E
2T = 2NB + N ^2 * E - NE
0 = EN ^2 + (2B-E)N - 2T
0 = ax^2 + bx + c
x = [-b +- SQR(b^2 - 4ac)] /2a
Therefore
N = [-(2B-E) +- SQR([2B-E]^2 - 8ET)] /2E
-
Aug 29th, 2003, 08:30 AM
#8
Originally posted by DiGiTaIErRoR
I'm positive:
n=(2*t/ n-2*b)/e+1
is also correct.
True, but it also doesn't have N on it's own 
This isn't something that needs to run fast, so the first answer you posted is certainly good enough! 
Thanks again
-
Aug 29th, 2003, 09:00 AM
#9
So Unbanned
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|