Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CEXP(3)			    Library Functions Manual		       CEXP(3)

NAME
       cexp, cexpf, cexpl -- complex exponential functions

LIBRARY
       Math Library (libm, -lm)

SYNOPSIS
       #include	<complex.h>

       double complex
       cexp(double complex z);

       float complex
       cexpf(float complex z);

       long double complex
       cexpl(long double complex z);

DESCRIPTION
       The cexp(), cexpf(), and	cexpl()	functions compute the complex exponen-
       tial of z, also known as	cis(z).

RETURN VALUES
       For real	numbers	x and y, cexp()	behaves	according to Euler's formula:

	     cexp(x + I*y) = (e**x * cos(y)) + (I * e**x * sin(y))

       Generally speaking, infinities, zeroes and NaNs are handled as would be
       expected	 from  this  identity  given the usual rules of	floating-point
       arithmetic.  However, care is taken to avoid generating NaNs when  they
       are   not   deserved.   For  example,  mathematically  we  expect  that
       cimag(cexp(x + I*0)) = 0	regardless of the value	of x, and cexp()  pre-
       serves  this  identity  even  if	 x  is	infinity  or  NaN.   Likewise,
       cexp(-infinity +	I*y) = 0 and creal(cexp(infinity +  I*y))  =  infinity
       for  any	y (even	though the latter property is only mathematically true
       for representable y.)  If y is not finite, the sign of  the  result  is
       indeterminate.

SEE ALSO
       complex(3), exp(3), math(3)

STANDARDS
       The cexp(), cexpf(), and	cexpl()	functions conform to ISO/IEC 9899:1999
       ("ISO C99").

FreeBSD	14.3		       November	3, 2021			       CEXP(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=cexp&sektion=3&manpath=FreeBSD+14.3-RELEASE+and+Ports>

home | help