diff options
Diffstat (limited to 'libf2c/libF77')
-rw-r--r-- | libf2c/libF77/pow_zz.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libf2c/libF77/pow_zz.c b/libf2c/libF77/pow_zz.c index 522b639..d5cfbf3 100644 --- a/libf2c/libF77/pow_zz.c +++ b/libf2c/libF77/pow_zz.c @@ -8,6 +8,12 @@ pow_zz (doublecomplex * r, doublecomplex * a, doublecomplex * b) { double logr, logi, x, y; + if (a->r == 0.0 && a->i == 0.0) + { + /* Algorithm below doesn't cope. */ + r->r = r->i = 0.0; + return; + } logr = log (f__cabs (a->r, a->i)); logi = atan2 (a->i, a->r); |