diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c b/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c index 53ac2bbbfb3..6f3f01b70a0 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c +++ b/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c @@ -36,6 +36,8 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., (z can be negative only for jn). Return 0 if the expansion does not converge enough (the value 0 as inexact flag should not happen for normal input). + Note: for MPFR_RNDF, it returns 0 if the expansion failed, and a non-zero + value otherwise (with no other meaning). */ static int FUNCTION (mpfr_ptr res, long n, mpfr_srcptr z, mpfr_rnd_t r) @@ -265,5 +267,7 @@ FUNCTION (mpfr_ptr res, long n, mpfr_srcptr z, mpfr_rnd_t r) : mpfr_neg (res, c, r); mpfr_clear (c); - return inex; + /* for RNDF, mpfr_set or mpfr_neg may return 0, but if we return 0, it + would mean the asymptotic expansion failed, thus we return 1 instead */ + return (r != MPFR_RNDF) ? inex : 1; } |