1) UCB code to scroll portion of screen with al/dl works only for fullscreen
[unix-history] / lib / libF77 / pow_zz.c
CommitLineData
547779a8
WH
1#include "f2c.h"
2
3#ifdef KR_headers
4double log(), exp(), cos(), sin(), atan2(), f__cabs();
5VOID pow_zz(r,a,b) doublecomplex *r, *a, *b;
6#else
7#undef abs
8#include "math.h"
9extern double f__cabs(double,double);
10void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b)
11#endif
12{
13double logr, logi, x, y;
14
15logr = log( f__cabs(a->r, a->i) );
16logi = atan2(a->i, a->r);
17
18x = exp( logr * b->r - logi * b->i );
19y = logr * b->i + logi * b->r;
20
21r->r = x * cos(y);
22r->i = x * sin(y);
23}