I am working on reverse engineering a game and have come across the following formula as a string in a config file:
A*(B^xt)+C; xt=A2*x*(T>x)*(B2^x+C2)
It would appear that I would solve for xt then plug it into the first function. However I don't know how to interpret the (T>x). I have static values for A, B, C, A2, B2, C2, T and they are as follows:
A: 300
B: 1.51
C: -319
A2: 1.8
B2: 0.93
C2: -0.64
T: 14
I know the outcomes of this equation to be:
x = 2, y = 365
x = 3, y = 714
x = 4, y = 1,241
x = 5, y = 2,036
(I can post more if needed)
My attempts to plug in the constants and x value (completely ignoring the (T>x)) have resulted in values that are not even close to what they are supposed to be. I'm hoping someone here can make sense of it, especially the (T>x) part. Thank you for any help you may be able to provide.
The values you've shown are consistent with
y=A*(B^x)+C, if we interpret the caret^as exponentiation and round to the nearest integer:So I'm not convinced that this code first computes
xtand then plugs it into the first part; I'd suppose that the first part is computed first, using a previously established value ofxtwhere it happens to be equal tox, and then, perhaps, the second part is used to change the value ofxtto something mysterious.