How can I solve a^i=b in Objective C?

  • Context: Undergrad 
  • Thread starter Thread starter rhenretta
  • Start date Start date
  • Tags Tags
    Algebra
rhenretta
Messages
65
Reaction score
0
My math skills are failing me, and I was hoping one of you could help me with this real quick..

I need to solve for i:
[itex]a^{i}=b[/itex]

a in this case is based on the interval in the musical scale, so
[itex]a = 2^{\frac{1}{12}}[/itex]

I have to solve this in objective c, and apparently it doesn't let me solve logarithms except for bases 2, 10, and e
 
Mathematics news on Phys.org
rhenretta said:
My math skills are failing me, and I was hoping one of you could help me with this real quick..

I need to solve for i:
[itex]a^{i}=b[/itex]

a in this case is based on the interval in the musical scale, so
[itex]a = 2^{\frac{1}{12}}[/itex]

I have to solve this in objective c, and apparently it doesn't let me solve logarithms except for bases 2, 10, and e

Hey rhenretta.

This kind of problems what is called logarithms. Basically logs and exponentials are inverses in that log(e^x) = x and e(log(x)) = x for valid x's. So we have:

[itex]log_a(a^{i}) = log_a(b)[/itex] gives us
[itex]i = log_a(b) = \frac{ln(b)}{ln(a)}[/itex]

where ln(x) is the natural logarithm function.
 
Thanks chiro :)
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K