C Reference function exp()
Usage of exp():
double exp(double x);
Parameters:
There is no range limit on the argument.
Return value:
There is no range limit on the return value.
Source code example of exp():
#include<stdio.h>
#include<math.h>
main()
{
double input, output;
input = 2.0;
output = exp (input);
printf ("Exponential value of %lf is %lf.\n", input, output);
return 0;
}
Output of the exp example program above:
Exponential value of 2.000000 is 7.389056
This entry was posted in C Reference math.h Functions.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Tweet This! or use
to share this post with others.
this exp fun’s aren’t working in gcc compilers………..
@karthikeyan
This is not true!
You probably get the following error: ERROR: Undefined symbol: .exp
The solution is that you are forgetting to link the math library during compilation, to link the math lib use “-lm”.
For example: gcc exptest.c -o exptest -lm
Than it should work, good luck!