Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: 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]
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Sun Jul 27, 2014 3:41 pm   
 
Check out this:
http://www.wolframalpha.com/input/?i=40+%3D+%28%28%28%28%28800-A%29*267%29*100%29%2F800%29%2F85%29%2B1%2C+find+A
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: 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)

Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net