Re: UP formula?
Posted: Thu Sep 13, 2007 9:30 am
yea i know that.. its just a hypothetical starting point to test the formula.
These are the forums for the GateWa.rs family of text-based space-centred PBBGs
https://talk.gatewa.rs/
_of War wrote:ok...
((TUP/3)*(TUP/3)+TUP/3)*7500-((CUP/3)*(CUP/3)+CUP/3)*7500-5000
TUP = 20,000
CUP = 1
(TUP/3) = (6,666.67 * 6,666.67 + 6,666.67) * 7,500 = 333,383,666,700
(CUP/3) = (.33 * .33 + .33) * 7500 = 4950 - 5000 = -50
333,383,666,700 - -50 = 333,383,666,750.
if my math is wrong please correct me.. but I don't see any problems with it.
Lucky Starr wrote:_of War wrote:ok...
((TUP/3)*(TUP/3)+TUP/3)*7500-((CUP/3)*(CUP/3)+CUP/3)*7500-5000
TUP = 20,000
CUP = 1
(TUP/3) = (6,666.67 * 6,666.67 + 6,666.67) * 7,500 = 333,383,666,700
(CUP/3) = (.33 * .33 + .33) * 7500 = 4950 - 5000 = -50
333,383,666,700 - -50 = 333,383,666,750.
if my math is wrong please correct me.. but I don't see any problems with it.
As I said, I don't see anything wrong with either your math or the formula itself, and I'm pretty sure the calculator works just fine. If you don't like the end result, that's because, given a CUP of 1, you can't have a TUP of 20000... since you can only upgrade your UP by a multiple of 3. Try the formula for a TUP of 20002 (6667 upgrades) instead.
Hope this made sense.
Code: Select all
//Let $a be the initial UP value
//Let $b be the target UP value
floor(sqrt(((3*$b)/2500)+pow($a,2)+$a))Code: Select all
//Let A be the initial UP value
//Let B be the target UP value
The_square_root_of( ( 3B / 2500 ) + A^2 + A )Agapooka wrote:Here's my math:
For those of you who can read PHP:Code: Select all
//Let $a be the initial UP value
//Let $b be the target UP value
floor(sqrt(((3*$b)/2500)+pow($a,2)+$a))
In a human, mathematical form:Code: Select all
//Let A be the initial UP value
//Let B be the target UP value
The_square_root_of( ( 3B / 2500 ) + A^2 + A )