The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
I've got to do some work that includes figuring out the pre-VAT cost of an item given the cost of the item including VAT. So, the item in particular is going to be 3.50GBP. With 17.5% VAT, that means pre-VAT cost was about 2.98GBP. Rather than hard coding this 2.98GBP in my app, though, I would much prefer to take that 3.50GBP that I am given as input and determine the pre-VAT value, that way if the 3.50GBP changes at some point in the future (most likely with no one at the company bothering to tell me), I don't have to go back and make changes to the program/configuration to deal with it, it'll just figure out the new pre-VAT value automagically using them fancy math skills I never really developed.
So, basically, I need to be able to solve:
y + (y * .175) = 3.50
Thanks vrtra, that does work even better. I was trying to figure out (and getting close to giving up and asking) how the .851 was determined so that I could sort it out later if a different VAT was needed since that is a possibility a month or two down the line, I believe.
I should really go back to school and take some math classes. I'm one of those developers that mostly does non-math related stuff and so my already lacking math skills have slipped a lot over the years.
Posts
Give or take
The Sixth Annual Triwizard Drinking Tournament Part 1 |
Pokecrawl Episode 4: The Power Of One!
Portalflip
Pokemon X: Atlus | 3539-8807-3813
Thanks man, I appreciate it.
I should really go back to school and take some math classes. I'm one of those developers that mostly does non-math related stuff and so my already lacking math skills have slipped a lot over the years.