source:
EcnlProtoTool/trunk/musl-1.1.18/src/complex/clog.c@
444
Last change on this file since 444 was 444, checked in by , 4 years ago | |
---|---|
|
|
File size: 182 bytes |
Rev | Line | |
---|---|---|
[444] | 1 | #include "libm.h" |
2 | ||
3 | // FIXME | |
4 | ||
5 | /* log(z) = log(|z|) + i arg(z) */ | |
6 | ||
7 | double complex clog(double complex z) | |
8 | { | |
9 | double r, phi; | |
10 | ||
11 | r = cabs(z); | |
12 | phi = carg(z); | |
13 | return CMPLX(log(r), phi); | |
14 | } |
Note:
See TracBrowser
for help on using the repository browser.