Xen
Member
Hello,
I'm trying to reverse engineer piece of software we have here, so we can make our life easier for everyone, and I'm stuck at this place:
I found out that final result is calculated with formula: =round(P+round(P/C;2)*B ;2)= A
C and B are known naturally, and I found a way to calculate A using other premises we have.
P is that variable that should be entered in program, so we get final result (and what we want is to know what we should enter so we get exact A)
So, I have A B C and P, and A B C are known and the only thing we don't know is P. And every time I try to express P via known variables, I fail at the point where it rounds P divided by C. Removing rounding and expressing P without it gives somewhat close result, but it is always a little bit off, and precision is very important here. Right now, since I know what is desired result, I get approximate P, compare A that it gives to exact A that I found using other variables (those have no use of P, so no help there) and add manual corrections to straight formula until I get exact result.
I've uploaded sample file where all the variables known. If anyone knows what am I missing, please let me know.
I'm trying to reverse engineer piece of software we have here, so we can make our life easier for everyone, and I'm stuck at this place:
I found out that final result is calculated with formula: =round(P+round(P/C;2)*B ;2)= A
C and B are known naturally, and I found a way to calculate A using other premises we have.
P is that variable that should be entered in program, so we get final result (and what we want is to know what we should enter so we get exact A)
So, I have A B C and P, and A B C are known and the only thing we don't know is P. And every time I try to express P via known variables, I fail at the point where it rounds P divided by C. Removing rounding and expressing P without it gives somewhat close result, but it is always a little bit off, and precision is very important here. Right now, since I know what is desired result, I get approximate P, compare A that it gives to exact A that I found using other variables (those have no use of P, so no help there) and add manual corrections to straight formula until I get exact result.
I've uploaded sample file where all the variables known. If anyone knows what am I missing, please let me know.