Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 778 Bytes

087_exp.asciidoc

File metadata and controls

48 lines (31 loc) · 778 Bytes

exp

NAME

exp - exponential function.

SYNOPSIS
#include <math.h>

double exp(double x);
DESCRIPTION

The exp() function returns the value of e (the base of natural logarithms) raised to the power of x.

Warning
You’ll also need to link the program against the math library (see example below) using the -lm compile/link option.
RETURN VALUE

On success, these functions return the exponential value of x.

SEE ALSO

log, log10

EXAMPLE
link:src/exp.c[role=include]
OUTPUT
$ gcc -Wall -lm exp.c
$ ./a.out
EXP(4.605170) = 100.000000