Syntax
#include <math.h> double exp(double x);Description
exp calculates the exponential function of a floating-point argument x (ex, where e equals 2.17128128...).
If an overflow occurs, exp returns HUGE_VAL. If an underflow occurs, it returns 0. Both overflow and underflow set errno to ERANGE.
This example calculates y as the exponential function of x:
#include <math.h> int main(void) { double x,y; x = 5.0; y = exp(x); printf("exp( %lf ) = %lf\n", x, y); return 0; /**************************************************************************** The output should be: exp( 5.000000 ) = 148.413159 ****************************************************************************/ }Related Information