0 Members and 1 Guest are viewing this topic.

The logarithm to base b = 10 is called the common logarithm and has many applications in science and engineering. The natural logarithm has the constant e (≈ 2.718) as its base; its use is widespread in pure mathematics, especially calculus. The binary logarithm uses base b = 2 and is prominent in computer science.

For example, a compiled application using log(15) returns 2.708.

Yeah, I think you're right. Unless I'm just getting confused, Dynamic C appears to be doing the same thing. One solution :#define LOG log10 //lib is wrong#define LOG10 log //lib is wrongNow when I use LOG(x) it replaces it with log10(x). LOG10(x) is replaced by log(x)I was a little suprised that this worked. It's a little anal, but it might save me some head scratching if I need to go back and trouble shoot the algorithm sometime in the future.

If ln(x) is not used elsewhere, you might choose to define it as your natural log function.