# Logarithm flowchart

#### pepablok

We began learn flowcharts at school. First homework is make logarithm flowchart. I don't know how work logarithm cause we didn't learn in math yet. I tried make flowchart myself but I'm sure it's wrong cause don't know how logarithm works. Can someone help me?
Thanks Related Engineering and Comp. Sci. Homework News on Phys.org

#### Mark44

Mentor
We began learn flowcharts at school. First homework is make logarithm flowchart. I don't know how work logarithm cause we didn't learn in math yet. I tried make flowchart myself but I'm sure it's wrong cause don't know how logarithm works. Can someone help me?
Thanks That's a very nice flowchart, but as you point out, it's pretty well meaningless.

Please give us the exact wording of the problem you're working on. What you have provided isn't enough for me to understand what it is that you're trying to do.

#### pepablok

Ok, I'm sorry for poor information, hope this will explain my problem better. Our teacher show us very similiar flowchart for dividing two integers. Here is his flowchart: And then he said do flowchart for calculation of logarithm. I'm sure I need include somehow in flowchart this formula y=logax, ay=x. But I don't know how

Last edited:

#### Mark44

Mentor
That's still pretty vague, but I'll give it a shot.

Suppose you want to calculate y = log1030. That's equivalent to solving the equation 30 = 10y.

Start with an initial guess of y0 = 1.
Check it: 101 = 10 - too small. We want the answer to be 30.

Try a larger number. Let y1 = 2.
Check it: 102 = 100 - too big.

Note: Although I haven't found the number I'm looking for, my first two estimates tell me that log 30 is somewhere between 1 and 2.

As long as I have the true value bracketed between two numbers, one of which gives an answer that's too small and the other an answer that's too large, I'm in good shape. I can refine my estimate by choosing the number halfway between the two trial numbers.

Try y2 = 1.5.
Check: 101.5 = 31.6227766 (approx.) - too big, but getting closer.

Of my three trial values, 1, 1.5, and 2, 101 = 10, 101.5 = 31.6227766, and 102 = 100. For the next value I try, I want to find the number in whichever half-interval brackets the answer. Since 30 is between 10 and 31.31.6227766, but ISN"T between 31.6227766 and 100, I'll pick the midpoint of the interval [1, 1.5], namely 1.25.

Try y3 = 1.25
Check: 101.25 = 17.7827941 (approx.) - too small.

I continue with this process (which is called bisection) until two successive trial values give results that are "close enough." You can define how close you want to get - for example, if the two trial values produce results that are within .005 of each other (i.e., agree to two decimal places).

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving