Jump to content

Percentages in Alfred calculator


Jb_Bryant

Recommended Posts

  • 2 months later...

I agree entirely!  I am constantly calculating percentages.  For example, I'd LOVE to type "100+10%" to get the result "110".  Currently, I have to type "100+(100*.10)" to achieve the same result.

 

Thanks for considering this improvement, and of course, for an already awesome app!   :)

Link to comment
Share on other sites

  • 1 year later...

Due to the nature of Alfred's calculator (which is based on CGMathParser), it uses the % mark as mod remainder... so =23%10 equals 3.

 

There are a few normal calculator workflows on the forum which may treat % differently, but at this point, I have no intention to modify CGMathParser. I do have a note of this in my bug tracker though, so will keep it in mind.

Link to comment
Share on other sites

Hi Andrew,

 

I've tried googling around for a layman explanation of GCMathParser's method of doing percentages but it doesn't seem very straightforward. =10%100 = 10 (ok this is easy!) =10%200 = 10 (hang on…) = 10%1000 = 10 (wtf?). I had come across the Percentage plugin and have been using that, which seems much more sensible in usage (to me anyway).

 

Cheers

Link to comment
Share on other sites

Hi Andrew,

I've tried googling around for a layman explanation of GCMathParser's method of doing percentages but it doesn't seem very straightforward. =10%100 = 10 (ok this is easy!) =10%200 = 10 (hang on…) = 10%1000 = 10 (wtf?). I had come across the Percentage plugin and have been using that, which seems much more sensible in usage (to me anyway).

Cheers

The % operator means "remainder" in GCMathParser (and in many programming languages). So 7 % 3 = 1, because 7 divided by 3 is 2 *remainder 1*. 10 % 10 is actually 0, because 10 divides into 10 once with *no remainder*.

Try typing "7 % 3" into Google; you should see the same result Alfred gives you.

I might also note: few computer languages have an operator for percentages, just because its so simple to do with division (divide by 100, multiply by percentage)

Hope this helps

Link to comment
Share on other sites

Hello mate,

 

Thanks for explaining the theory of it.

 

It might be simple to do using the other route but it takes 25% longer to complete a calc*. If you're doing 1000 calcs a day this adds up pretty quickly. I might be missing something but that's why I use calculators that are able to do x + y%. 

 

*for industries that aren't programming-related, I suppose.

 

Cheers

HP

Link to comment
Share on other sites

  • 4 weeks later...

Isn't multiplication an acceptable alternative?

 

25 + 20% = 25 * 1.2

127 + 45% = 127 * 1.45

390 - 17% = 390 * 0.83

etc.

 

To work out what percentage x is of y, do x / y (and multiply by 100 if you really need to):

25 / 100 = 0.25 (i.e. 25%)

37 / 82 = 0.45 (i.e. 45%)

etc.

Edited by deanishe
Link to comment
Share on other sites

Hello Deanishe,

 

I would have to politely disagree as that is akin to asking why one would bother with Alfred at all given that you can do everything it offers the long way. This is why our office has physical calculators with the percentage function… to save time. 

 

Cheers,

HP

Edited by hpsauce
Link to comment
Share on other sites

In all seriousness, if calculating percentages is such a big thing for you, why do you want to do it with a launcher app instead of an app designed specifically for that kind of thing?

 

Given the way Alfred does maths (which won't be changing anytime soon, according to Andrew), that's the fastest way to calculate percentages.

 

I'm sorry if my suggestion isn't acceptable to you, but it might be helpful to someone like designjoe above who's been using "100+(100*.10)" instead of "100*1.1".

Edited by deanishe
Link to comment
Share on other sites

  • 6 months later...

The problem is that 100 plus 10% is actually $111.11. Try it on a calculator...$111.11 x 90% = $100.00. $110 x 90% = $99.00

 

Another example...add 6% comission to a $500,000 sales price of a house. Most people would use $500,000 x 6% = $30,000. That means the seller would end up with $470,000. The correct method is $500,000 divided by .94 = $531,914.89. Now, the seller ends up with exactly $500,000 after deducting 6% - $531,914.89 - 6% = $500,000.

 

I would really like to have a way to figure examples like this with Alfred.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...