Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / gcc-3.4 / libf2c / libF77 / c_log.c
1 #include "f2c.h"
2
3 #undef abs
4 #include "math.h"
5 extern double f__cabs (double, double);
6
7 void
8 c_log (complex * r, complex * z)
9 {
10   double zi, zr;
11   r->i = atan2 (zi = z->i, zr = z->r);
12   r->r = log (f__cabs (zr, zi));
13 }