Commit 33672562 by Craig Burley Committed by Craig Burley

cope with partial overlap

From-SVN: r26741
parent a152cad7
Mon May 3 11:21:35 1999 Craig Burley <craig@jcb-sc.com>
* libF77/c_log.c: Cope with partial overlap a la z_log.c.
(Change likely to be made to netlib version shortly.)
Mon May 3 11:12:38 1999 Craig Burley <craig@jcb-sc.com> Mon May 3 11:12:38 1999 Craig Burley <craig@jcb-sc.com>
Update to Netlib version of 1999-05-03: Update to Netlib version of 1999-05-03:
......
...@@ -11,7 +11,7 @@ extern double f__cabs(double, double); ...@@ -11,7 +11,7 @@ extern double f__cabs(double, double);
void c_log(complex *r, complex *z) void c_log(complex *r, complex *z)
#endif #endif
{ {
double zi; double zi = z->i, zr = z->r;
r->i = atan2(zi = z->i, z->r); r->i = atan2(zi, zr);
r->r = log( f__cabs(z->r, zi) ); r->r = log( f__cabs( zr, zi ) );
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment