diff options
author | toon <toon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-19 23:17:36 +0000 |
---|---|---|
committer | toon <toon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-19 23:17:36 +0000 |
commit | 9407d5e44b5f395b623e63fe75eec84d2ad47361 (patch) | |
tree | 3b88d6d3847d7785e7d7a32ceaeb9108cdb7125a /libf2c | |
parent | 0f0d6464fafa37dc31c985a0fe68b9becf007673 (diff) | |
download | gcc-9407d5e44b5f395b623e63fe75eec84d2ad47361.tar.gz |
2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/8587
* libF77/pow_zz.c: Handle (0.0, 0.0) ** power.
2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/8587
* news.texi: Show PR fortran/8587 fixed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c')
-rw-r--r-- | libf2c/ChangeLog | 5 | ||||
-rw-r--r-- | libf2c/libF77/pow_zz.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index e06717f03bd..7e10295040d 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,8 @@ +2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl> + + PR fortran/8587 + * libF77/pow_zz.c: Handle (0.0, 0.0) ** power. + 2002-09-23 Zack Weinberg <zack@codesourcery.com> * libF77/Version.c: Rename junk to __LIBF77_VERSION__. Add diff --git a/libf2c/libF77/pow_zz.c b/libf2c/libF77/pow_zz.c index 522b639bc7e..d5cfbf3d931 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); |