Ok thank you very much for your addition.
The other way does seem to produce the right result in about 2 lines! When you have many of these calcs to do, two lines seem a little 'tidier'.
But I did ask how your way was better, or if it is more accurate etc.
Maths advice please-deducting first set of values, then more
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Maths advice please-deducting first set of values, then
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Maths advice please-deducting first set of values, then
I guess the 'better' would depend on the criteria, (in this case amount of code) then no, it's not better. As for more accurate, i think the accuracy is the same because the base formula for determining a percentage is pretty standard, as are the results.simonmlewis wrote:But I did ask how your way was better, or if it is more accurate etc.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Maths advice please-deducting first set of values, then
It does, thank you for your help.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.