Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2019-08-23 11:42:03

Hannibal lecter
Member
Registered: 2016-02-11
Posts: 392

stock in a simple algorithm

Suppose your cell phone carrier charges you $29.95 for up to 300 minutes of calls, and $0.45 for each additional minute, plus 12.5 percent taxes and fees. Give an algorithm to compute the monthly charge from a given number of minutes.

answer :-

Is the number of minutes at most 300? a. If so, the answer is $29.95 × 1.125 = $33.70. b. If not, 1. Compute the difference: (number of minutes) – 300. 2. Multiply that difference by 0.45. 3. Add $29.95. 4. Multiply the total by 1.125. That is the answer.



the question  if from where did we get " 1.125 " ???
it was 12.5!  why who answer this question turn it to 1.125
why is that and how?


Wisdom is a tree which grows in the heart and fruits on the tongue

Offline

#2 2019-08-23 19:25:03

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: stock in a simple algorithm

Hi,

I think this may answer your other post as well.

If you want to increase x by 12.5% , then first you would do x times 12.5 / 100 = 0.125x. Then add on the original amount = x + 0.125x = 1.125x

You can shortcut the algorithm by doing 1.125x in one step.

Similarly a decrease of 12.5% can be shortened to 0.875x, that's (1 - 12.5/100)x

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2019-08-23 23:58:00

Hannibal lecter
Member
Registered: 2016-02-11
Posts: 392

Re: stock in a simple algorithm

is the integer always = 1 ?
I mean what if it was 13.5 it will be 1.135 ?
and if it was for example 222.10 it will be 1.22210 ?
is the number in the left always will be 1 ?


Wisdom is a tree which grows in the heart and fruits on the tongue

Offline

#4 2019-08-24 00:48:41

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: stock in a simple algorithm

The one arises from 100%.  So 13.5% would indeed have a multiplier of 1.135

But if you wanted an increase of 222.10% then the calculation would be:

x + x  times 222.10/100 = x + 2.221x = 3.221x

In general, if the percentage is r% then the multiplier is 1 + r/100 for an increase and 1 - r/100 for a decrease.

Eg.  What is the new wage after a pay increase of 15% when the old wage is $200.

x = 200.    Multiplier = 1.15. New wage = 200 times 1.15 = $230

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#5 2019-09-09 08:39:26

Hannibal lecter
Member
Registered: 2016-02-11
Posts: 392

Re: stock in a simple algorithm

is there another way?


Wisdom is a tree which grows in the heart and fruits on the tongue

Offline

#6 2019-09-09 08:55:11

Hannibal lecter
Member
Registered: 2016-02-11
Posts: 392

Re: stock in a simple algorithm

in math is fun I saw this example about convert a percent to a fraction pls look at the following picture :-
2019-09-09-234946.jpg

the question here is what if it was 2 digits after the decimal point ?
like the previous number 222.10%
when I was trying to convert it to fraction
I stuck into the second step
222.10/100 * 10/10 ? or 100?100 or multiply by 1000/1000?

the example of math if sun was 62.5% and they mentioned that they multiply both top and bottom by 10!! because there is 1 digit after the decimal point

in my number 222.10% there is 2 digits! 1 and 0
so do I have to multiply top and bottom by 100?
or 1000? or 10?


Wisdom is a tree which grows in the heart and fruits on the tongue

Offline

#7 2019-09-09 19:27:58

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: stock in a simple algorithm

In post 2 I showed how you can make a multiplier that shortens the steps for increasing and decreasing by a given percentage.

There is another way:

(1) Calculate the amount of the increase (decrease).

(2) Add (subtract) that amount from the old amount.

eg.

Increase $300 by 20%

(1) 20/100 x 300 = 60

(2) $300 + $60 = $360

With a multiplier you only need one step:

1.20 x 300 = 360

Now you are asking about changing a percentage into a fraction.  This is also a two step process.

(1) Put the percentage over 100.  (Always 100 as that's what a percent means cent = 100th part)

(2) Simplify the fraction.  There is not just one way to do this.  It depends on the numbers.  I'll give several examples.

eg1.  Change 25% into a fraction.

25/100 ….divide top and bottom by 25 = 1/4

eg2. Change 87.5% into a fraction.

87.5/100 eliminate the decimal within the fraction so that both the top number and the bottom number are whole

875/1000 now simplify … divide by 25  = 35/40  divide by 5   = 7/8

eg3. Change 222.10% into a fraction.

222.10/100 As the top ends in a zero it is sufficient to times by 10  = 2221/1000 No cancelling is possible here.

eg4. Change 52.55% into a fraction.

52.55/100 times by 100 = 5255/10000 divide by 5 = 1051/2000 No further cancelling possible.

Hope that helps.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

Board footer

Powered by FluxBB