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 | |
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
-rw-r--r-- | gcc/f/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/f/news.texi | 4 | ||||
-rw-r--r-- | libf2c/ChangeLog | 5 | ||||
-rw-r--r-- | libf2c/libF77/pow_zz.c | 6 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 4960f2f278d..2142b4c0d16 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl> + + PR fortran/8587 + * news.texi: Show PR fortran/8587 fixed. + 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com> * g77spec.c (lang_specific_spec_functions): New. diff --git a/gcc/f/news.texi b/gcc/f/news.texi index 24cec0aded5..2d0dc0f49ef 100644 --- a/gcc/f/news.texi +++ b/gcc/f/news.texi @@ -10,7 +10,7 @@ @c in the standalone derivations of this file (e.g. NEWS). @set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002 -@set last-update-news 2002-11-02 +@set last-update-news 2002-11-19 @include root.texi @@ -181,6 +181,8 @@ gave wrong results) (libf2c) DATE_AND_TIME milliseconds field inactive on Windows @item 7388 Incorrect output with 0-based array of characters +@item 8587 +Double complex zero ** double precision number -> NaN instead of zero @end table @item Richard Henderson (@email{rth@@redhat.com}) analysed and improved the handling 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); |