bugGNU Scientific Library - Bugs: bug #63519, gsl_root_fsolver_set...

 
 

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

bug #63519: gsl_root_fsolver_set "endpoints do not straddle y=0"

Submitter:  Navi <nkr>
Submitted:  Tue 13 Dec 2022 01:18:16 PM UTC
   
 
Category:  Performance Severity:  3 - Normal
Operating System:  Debian Testing Status:  None
Assigned to:  None Open/Closed:  Open
Release:  2.7.1

Tue 13 Dec 2022 01:22:11 PM UTC, comment #1: 

This issue is very similar to "bug #60371: Interpolation domain error handling" and the proposed solution could also be similar for both.

Navi <nkr>
Tue 13 Dec 2022 01:18:16 PM UTC, original submission:  

Hello,

Root Bracketing Algorithms (bisection, brent, and falsepos) expect that the sign of f(a) and f(b) be different so that the endpoints do straddle f(x)=0. gsl_root_fsolver_set returns GSL_SUCCESS when the supplied interval is good and throws GSL_ERROR ("endpoints do not straddle y=0", GSL_EINVAL); otherwise.

I've a particular case where I've to split up my complete domain into subdomains to avoid singularities. My root is an angle and I've to avoid 0, 90, 180, and 360 degrees. So I split my domain into 4 quadrants; only one of which will be a valid interval. Now I could either test each interval before calling gsl_root_fsolver_set or redefine gsl's error handler to not "abort()". Option 1 is a performance issue for me because f(x) is a costly function. On the one hand gsl_root_fsolver_set expects the user to check beforehand that the end points do straddle y=0. But it checks again internally the validity of the same condition. Option 2 is what I do now.

If gsl_root_fsolver_set returns GSL_EINVAL instead of throwing an error it would give the user an option to handle the error (without redefining gsl's error handler) and also avoid checking the "endpoints do straddle y=0" condition twice.

Regards,
Navi

Navi <nkr>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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 nkr (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-12ab.
    Corresponding source code