* gcj.texi (Compatibility): Add Limitations and Extensions section.
[official-gcc.git] / libf2c / libF77 / pow_zz.c
blob522b639bc7e885e1cee128c642ed054d593676da
1 #include "f2c.h"
3 #undef abs
4 #include <math.h>
5 extern double f__cabs (double, double);
6 void
7 pow_zz (doublecomplex * r, doublecomplex * a, doublecomplex * b)
9 double logr, logi, x, y;
11 logr = log (f__cabs (a->r, a->i));
12 logi = atan2 (a->i, a->r);
14 x = exp (logr * b->r - logi * b->i);
15 y = logr * b->i + logi * b->r;
17 r->r = x * cos (y);
18 r->i = x * sin (y);