|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Sun Jul 27, 2014 11:22 am
Any mathematicians?! |
I'm currently trying to make a piece of complex code for working out the exact condition of my equipment.
Basically, I need to work out the formula to find "A" and my brain is frozen right now!
Code: |
40 = (((((800-A)*267)*100)/800)/85)+1 |
Any help would be greatly appreciated.[/quote] |
|
|
|
rozdwojeniejazni Wanderer
Joined: 13 Aug 2011 Posts: 74
|
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Sun Jul 27, 2014 3:55 pm |
This is pretty basic algebra. You basically undo the equation on both sides of the equals sign until you end up with "A=????" (or "????=A")
Also, I'm guessing that many of the values in the equation can change. So, they should be variables as well. I'm going to not finish out the math, so that you can see where to substitute variables for the constants in the final equation if you need to.
Code: |
40 = (((((800-A)*267)*100)/800)/85)+1
40 - 1 = (((((800-A)*267)*100)/800)/85)+1 - 1
40 - 1 = (((((800-A)*267)*100)/800)/85)
40 - 1 = (((((800-A)*267)*100)/800)/85) * 85
(40 - 1) * 85 = ((((800-A)*267)*100)/800)
((40 - 1) * 85) * 800 = ((((800-A)*267)*100)/800) * 800
((40 - 1) * 85) * 800 = (((800-A)*267)*100)
(((40 - 1) * 85) * 800) / 100 = (((800-A)*267)*100) / 100
(((40 - 1) * 85) * 800) / 100 = ((800-A)*267)
((((40 - 1) * 85) * 800) / 100) / 267 = ((800-A)*267) / 267
((((40 - 1) * 85) * 800) / 100) / 267 = (800-A)
(((((40 - 1) * 85) * 800) / 100) / 267) + A = (800-A) + A
(((((40 - 1) * 85) * 800) / 100) / 267) + A = 800
A + (((((40 - 1) * 85) * 800) / 100) / 267) = 800
A + (((((40-1)*85)*800)/100)/267) - (((((40-1)*85)*800)/100)/267) = 800 - (((((40-1)*85)*800)/100)/267)
A = 800 - (((((40-1)*85)*800)/100)/267)
|
|
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Sun Jul 27, 2014 5:00 pm |
Awesome Hogarius, it works. Yeah my head was just fried after hours of staring into multi-layer strings. Thanks a lot.
|
|
|
|
|
|