bugGNU Scientific Library - Bugs: bug #31362, The Complete Elliptic Integrals...


You are not allowed to post comments on this tracker with your current authentication level.

bug #31362: The Complete Elliptic Integrals (gsl_sf_ellint_Ecomp and _Kcomp) Loop Forever with NaN Argument

Submitted by:  Will M. Farr <wmfarr>
Submitted on:  Mon 18 Oct 2010 01:34:26 PM UTC  
Category:  Runtime error Severity:  3 - Normal
Operating System:  Mac OS X 10.6.4 Status:  Confirmed
Assigned to:  None Open/Closed:  Open
Release:  1.14

Sat 23 Oct 2010 01:53:06 PM UTC, comment #1:

Thanks for the bug report. I've confirmed the problem and added a couple of test cases for it.

-Deleted Account- <bjg>
Mon 18 Oct 2010 01:34:26 PM UTC, original submission:

Feeding a NaN to the complete elliptic integrals causes these functions to loop forever. Compile and execute the following program:


int main() {
double nan = 0.0/0.0;

printf("Elliptic integral of nan = %g\n", gsl_sf_ellint_Ecomp(nan, GSL_PREC_DOUBLE));
printf("Elliptic integral of nan = %g\n", gsl_sf_ellint_Kcomp(nan, GSL_PREC_DOUBLE));

return 0;

Nothing will ever be printed. I haven't checked any of the other elliptic integral special functions. Probably these functions should return NaN with NaN arguments, but they could also call gsl_error(...) I suppose. In any case, the should not loop forever.

Will M. Farr <wmfarr>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by wmfarr (Submitted the item)



    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-23 bjg StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.3