![]() |
Using math functions
I need to calculate some function using e (the number e). I've been looking around and I can't figure out how to use it. I looked in math.h and didn't see anything useful. Also how do you correctly code exponents without just doing x*x*x*x.....? Thanks!
|
Just found the pow() function for the exponents.. still trying to figure out how to use e though.
|
look at exp() for e^x
|
I'm not sure what you mean by "the number e", but for exponents, pow(3,2) is equivalent to 3^2.
EDIT: Make sure that pow() uses arguments that are double or float type, they both must be the same type. It's return value is also a double or float type. If you are going to display the output of pow(), make sure you use the %f specifier (if you are coding in C). |
| All times are GMT -5. The time now is 11:21 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC