xref: /third_party/musl/src/complex/clog.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/complex/
1570af302Sopenharmony_ci#include "complex_impl.h"
2570af302Sopenharmony_ci
3570af302Sopenharmony_ci// FIXME
4570af302Sopenharmony_ci
5570af302Sopenharmony_ci/* log(z) = log(|z|) + i arg(z) */
6570af302Sopenharmony_ci
7570af302Sopenharmony_cidouble complex clog(double complex z)
8570af302Sopenharmony_ci{
9570af302Sopenharmony_ci	double r, phi;
10570af302Sopenharmony_ci
11570af302Sopenharmony_ci	r = cabs(z);
12570af302Sopenharmony_ci	phi = carg(z);
13570af302Sopenharmony_ci	return CMPLX(log(r), phi);
14570af302Sopenharmony_ci}
15

Indexes created Thu Nov 07 10:32:03 CST 2024