Finding Inverse Exponential of Number Using C or Objective C
c, iphone, objective-c
Solution
It's not clear what you mean by "inverse exponential", but I'm going to list all of the potentially relevant math library functions and hopefully you can figure out which one you actually need.
`exp(x)` returns `e^x` (where `e` is the base of the natural logarithm, 2.71828...).
`exp2(x)` returns `2^x`.
`log(x)` returns the natural logarithm of `x` (the number `a` that satisfies `e^a = x`).
`log2(x)` returns the base-2 logarithm of `x`.
`log10(x)` returns the base-10 logarithm of `x`.
`pow(x,y)` returns x^y.
All of these functions are available on the iPhone. In order to get the prototypes, you will need to include the header that defines them. Add the line `#include <math.h>` to the beginning of your source file to do so.
If you need a more precise explanation of exactly what any of these functions do, or examples of their use, let me know.
Problem
How would a programmer like myself learn how to find an inverse exponential of a number? on my calculator 2nd LN or e^x. It is similar in concept to the neperien function on calculator e.g. the log of 2 is about 0.3 and the inverse log or 10^x of 0.3 is 2.) Note: This is to be used within an iPhone project using iPhone SDK Note: Here is an example of what I am needing to compute: then 0.91831 is raised to the power of the inverse exponential of .773848284, or, 0.91831^2.168332164 = 0.831282.