Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am developing web based game in which using lots of formulas to achieve different things. I am using the formulas below. Is there any better way to make these formulas more robust and dynamic like using calculus or any other approach to make them smaller and accurate etc?

$$\mathbf{Basic\ Building\ Cost}=300\text{ gold}+\frac{3}{2}(\text{# of acres}) + (0.1\text{ wood})(\text{# of acres})(\text{science})$$

OR

Armory – Stores weapons and armor $$\mathbf{Cost\ to\ build} = (\text{coal mine cost})+(.5\text{ iron})(\text{# of acres}) + (.5\text{ steel})(\text{# of acres}).$$

Sorry didn't know about the proper tags.

share|improve this question
    
You could do a bit of factoring. E.g., in the second formula, $$\text{cost to build}=\text {coal mine cost}+(.5)(\text{acres}) (\text{iron} +\text{steel})$$ –  David Mitra Jan 19 '12 at 15:15
5  
@pirzada Welcome to math.SE. Please look through FAQ on how to ask a question. Your question lacks focus, does not specify the criteria of improvement of your formula, thus making it difficult to properly answer. The question as is is likely to be closed as either non constructive, or of topic. The title of the question is not indicative of what the question is about either. –  Sasha Jan 19 '12 at 15:16
4  
What do you think is the problem with these formulas? Any computer built in the last ten years can store millions of such formulas in memory. –  Jay Jan 19 '12 at 15:19
5  
What does "more robust" mean? –  Arturo Magidin Jan 19 '12 at 17:42
2  
How can we determine whether the formulae can be made more accurate unless you tell us precisely what you want them to do? –  jwodder Jan 19 '12 at 17:48

1 Answer 1

As a computer programmer, I don't think that's expensive in terms of computing time. I would go with that "formula". Also easier if you decide to change it in the future.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.