Hello,

Since the 2F1 series is finite for either a or b being negative, this
should be used irrespectively of whether the absolute values are below
10.0 (why this specific value, BTW?).

The patch is attached.

Regards,

Evgeny
--- hyperg_2F1.c.orig	2004-06-20 21:41:17.000000000 +0300
+++ hyperg_2F1.c	2005-07-12 17:56:47.000000000 +0300
@@ -656,17 +656,18 @@ gsl_sf_hyperg_2F1_e(double a, double b, 
     return hyperg_2F1_series(a, b, c, x, result);
   }
 
+  /* Negative a or b result in finite series. */
+  if(a_neg_integer) {
+    return hyperg_2F1_series(rinta, b, c, x, result);
+  }
+  if(b_neg_integer) {
+    return hyperg_2F1_series(a, rintb, c, x, result);
+  }
+
   if(fabs(a) < 10.0 && fabs(b) < 10.0) {
     /* a and b are not too large, so we attempt
      * variations on the series summation.
      */
-    if(a_neg_integer) {
-      return hyperg_2F1_series(rinta, b, c, x, result);
-    }
-    if(b_neg_integer) {
-      return hyperg_2F1_series(a, rintb, c, x, result);
-    }
-
     if(x < -0.25) {
       return hyperg_2F1_luke(a, b, c, x, result);
     }
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to