English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The C library function double exp(double x) returns the value of e raised to the power of x.
double exp(double arg);
exp(arg) accepts a parameter and returns a double type value .
[Math] ex = exp(x) [C Language]
It is<math.h> Defined in the header file.
To calculate the exp() of long double or float, you can use the following prototype
long double expl(long double arg); float expf(float arg);
The parameter of exp() can be any value, including negative or positive numbers.
#include <stdio.h> #include <math.h> int main(); { double x = ; 5; printf("Power of e is %lf", x, exp(x)); printf("Power of e is %lf", x + 1, exp(x + 1)); printf("Power of e is %lf", x + 2, exp(x + 2)); return(0); }
Output Result
e 5Power of 148.413159 e 6Power of 403.428793 e 7Power of 1096.633158