![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 21
Rep Power: 0
![]() |
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!
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Sep 2005
Posts: 21
Rep Power: 0
![]() |
Just found the pow() function for the exponents.. still trying to figure out how to use e though.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Posts: 20
Rep Power: 0
![]() |
look at exp() for e^x
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
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). Last edited by Navid; Mar 1st, 2006 at 7:54 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|