bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] Division by zero in "hybrid*" when initial guess is root


From: Curran D. Muhlberger
Subject: [Bug-gsl] Division by zero in "hybrid*" when initial guess is root
Date: Sun, 27 Apr 2014 15:28:07 -0400

Hello GSL team,

The GSL implementations of the "Hybrid" family of multidimensional
rootfinders from MINPACK contain a bug where they divide by zero when the
initial guess happens to be the root.  This affects the "fsolver" types
"hybrid" and "hybrids" as well as the "fdfsolver" types "hybridj" and
"hybridsj".  This results in a floating point exception if trapping is
enabled.

I have attached a small program (bug_hybrid.c), based on the manual's
example code, that triggers this bug when GSL_IEEE_MODE=trap-common.  The
current output is:

    GSL_IEEE_MODE="trap-common"
    type = hybrid
    Floating point exception (core dumped)

The expected output is:

    GSL_IEEE_MODE="trap-common"
    type = hybrid
      status = success
      root = 1.000000e+00
    type = hybrids
      status = success
      root = 1.000000e+00
    type = hybridj
      status = success
      root = 1.000000e+00
    type = hybridsj
      status = success
      root = 1.000000e+00


I'll note that when I originally discovered this bug, a colleague of mine
claimed that the problem is not present in the original FORTRAN
implementation in MINPACK, but rather was introduced in the GSL port.

Thank you for looking into this, and if you have any questions, just let me
know.

 - Curran

Attachment: bug_hybrid.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]