Math Function Help

Status
Not open for further replies.
Level 11
Joined
Jun 30, 2008
Messages
580
I am trying to help myself instead of manually getting the output for some data I have. (Setting Minimum Exp for each level for a unit)

Basically I want it to take X*65 + Previous output.

I have a TI - 84 (Texas Instruments) How do I do this?

This is what I have when I do it manually:

X = 1 | Y = 65
X = 2 | Y = 195
X = 3 | Y = 390
X = 4 | Y = 650
x = 5 | Y = 975
 
n = 1 : x = 65n = 65 = 65*1
n = 2 : x = 65 + 65n = 195 = 65*3
n = 3 : x = 195 + 65n = 390 = 65*6
n = 4 : x = 390 + 65n = 650 = 65*10

1 goes to 1 = n*1
2 goes to 3 = n*1.5
3 goes to 6 = n*2
4 goes to 10 = n*2.5
5 goes to 15 = n*3

How interesting..
the factor function needs to output n*(0.5+n*0.5) = 0.5*(n+n^2)

So we get a function to calculate the value for any input which in your terms of variables is.
Y(X) = 32.5*(X+X^2)

or if you are forced to do integer mathematics (incase fixed point is a problem)
Y(X) = 65*(X+X^2)/2

You guys sujesting a loop solution to this make me sad. A loop solution would only be best if you are generating a table (need all values) and the loop maintence is faster than the power opperation (I do not know).

Skeptical about the function? Try it out and see... You will be suprized how some summantion can be transformed into polynomials. Yeh the way I went about it was a guess but there are rules governing summations.
 
n = 1 : x = 65n = 65 = 65*1
n = 2 : x = 65 + 65n = 195 = 65*3
n = 3 : x = 195 + 65n = 390 = 65*6
n = 4 : x = 390 + 65n = 650 = 65*10

1 goes to 1 = n*1
2 goes to 3 = n*1.5
3 goes to 6 = n*2
4 goes to 10 = n*2.5
5 goes to 15 = n*3

How interesting..
the factor function needs to output n*(0.5+n*0.5) = 0.5*(n+n^2)

So we get a function to calculate the value for any input which in your terms of variables is.
Y(X) = 32.5*(X+X^2)

or if you are forced to do integer mathematics (incase fixed point is a problem)
Y(X) = 65*(X+X^2)/2

You guys sujesting a loop solution to this make me sad. A loop solution would only be best if you are generating a table (need all values) and the loop maintence is faster than the power opperation (I do not know).

Skeptical about the function? Try it out and see... You will be suprized how some summantion can be transformed into polynomials. Yeh the way I went about it was a guess but there are rules governing summations.


Thanks so much! I actually got close to the function you had above, but gave up after 3 hours of trying to figure this out. I knew a loop wouldn't work so I didn't bother. Thanks for the help! (After about 3 hours trying to figure this out, I figured that if I just did them all manually I would have had them done by now :P)

+rep
 
Status
Not open for further replies.
Back
Top