cexp method

complex cexp(
  1. complex z
)

Computes the complex base-e exponential of z.

Implementation

complex cexp(complex z) {
  double expReal = math.exp(z.real);
  return complex(expReal * math.cos(z.imag), expReal * math.sin(z.imag));
}