quick question about log
i'm working on an assignment and i'm suppose to take the log of a number , on the assignment sheet it looks like this:
log( totalAmount) - 1
my question is how do i write log in c++ ? like i know to get a number to the second power x it will be something like (pow(number), x)
so anyone who can help is welcome
log in c is written
which gives the natural log of b. If you need to convert it to soem other base then simply divide the natural log of b by the natural log of the base you want and it gives you the log of b in that base.
a = log(b);