Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a software with a tool unable to "recognize" the ln(), so is there a way to get the equivalen to ln() using someones of functions below?

• sin1(a)
• cos1(a)
• tan1(a)
• log10(a) Logarithm (base 10) of a
• pow(x,y) x raised to the power y
• exp(a) e (the constant) raised to the power a
• sqrt(a) Square root of a
• sign(a) The sign of a (-1 if negative, 1 if positive)
• abs(a) The absolute value of a
• max(a,b)
• min(a,b)

share|cite|improve this question
up vote 3 down vote accepted

We have

$$\ln x=(\log_{10} x)(\ln 10).$$

The $\ln 10\,$ can be stored as a constant. For example, you could store it as $2.302585093$.

Remark: Let $w=(\log_{10} x)(\ln 10)$. Then $$e^y=e^{(\ln 10)(\log_{10}x)}=(e^{\ln 10})^{\log_{10} x}=10^{\log_{10}x}=x,$$ so indeed $y=\ln x$.

share|cite|improve this answer
Looks like ln 10 is unable too :( however, I will keep your answer because teach me how to use the log10 :) – manix Oct 2 '12 at 0:43
My calculator says it is approximately $2.3025851$. I am from the days when computers were slow and software was fast. (Now it is the other way around.) This likely would be faster than in effect computing the constant each time. – André Nicolas Oct 2 '12 at 0:52
You are correct. Also, for some reason trying to compute ln 10 so deeper you get diferent values each time. So, we have decided to use 5 decimals. – manix Oct 2 '12 at 1:02
@Manix: You can calculate $\ln 10$ to as many decimal places as you feel like using Wolfram Alpha. Then store it in the program as a constant to whatever precision you are working at. Possibly you might want to store it as several constants, which can be used depending on whether you are working in single precision, double, whatever. – André Nicolas Oct 2 '12 at 1:11

André Nicolas' answer is good, but you can also express it with those functions only and no hand-wired constants:

$\ln(x) = \frac{\log_{10}(x)}{\log_{10}(\exp(1))}$.

It's probably more efficient to store the constant, however (though I'm not sure that matters in your application). Note also that $\frac{1}{\log_{10}(\exp(1))} = \ln(10)$, so the two answers are in fact equivalent.

share|cite|improve this answer
Thank you, the function works as expected. Thank you – manix Oct 2 '12 at 0:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.