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

  • Context: Undergrad 
  • Thread starter Thread starter rhenretta
  • Start date Start date
  • Tags Tags
    Algebra
Click For Summary
SUMMARY

The discussion focuses on solving the equation a^i = b in Objective C, where a is defined as 2^(1/12), representing the musical scale interval. The solution involves using logarithms, specifically the formula i = log_a(b) = ln(b) / ln(a), where ln denotes the natural logarithm. Participants noted that Objective C's logarithmic functions are limited to bases 2, 10, and e, which necessitates the use of the natural logarithm for this calculation.

PREREQUISITES
  • Understanding of logarithmic functions and their properties
  • Familiarity with Objective C programming language
  • Knowledge of natural logarithm (ln) and its applications
  • Basic concepts of musical intervals and their mathematical representations
NEXT STEPS
  • Research how to implement logarithmic calculations in Objective C
  • Explore the mathematical properties of logarithms and exponentials
  • Learn about the use of natural logarithm in programming
  • Study the relationship between musical intervals and exponential functions
USEFUL FOR

Mathematicians, Objective C developers, and musicians interested in the mathematical foundations of musical scales.

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:
a^{i}=b

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

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:
a^{i}=b

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

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:

log_a(a^{i}) = log_a(b) gives us
i = log_a(b) = \frac{ln(b)}{ln(a)}

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

Similar threads

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