URL:
  <https://savannah.gnu.org/bugs/?67774>

                 Summary: Feature: arctan integral is also defined for
negative inputs
                   Group: GNU Scientific Library
               Submitter: fermelelundi
               Submitted: Fri 05 Dec 2025 11:36:25 AM UTC
                Category: Accuracy problem
                Severity: 3 - Normal
                Priority: 5 - Normal
        Operating System:
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
                 Release: 2.8


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 05 Dec 2025 11:36:25 AM UTC By: Fermé le Lundi <fermelelundi>
The arctangent integral is well defined for x < 0:
AtanInt(x) = \int_0^x dt \arctan(t)/t

and the following simple change to the function gsl_sf_atanint_e in
specfunc/atanint.c makes it well behaved, from:
result->err = x * result_c.err;
to:
result->err = ax * result_c.err;

Test cases for file specfunc/test_sf.c:
  TEST_SF(s, gsl_sf_atanint_e, (-1.0, &r), -0.91596559417721901505, TEST_TOL0,
GSL_SUCCESS);
  TEST_SF(s, gsl_sf_atanint_e, (-2.0, &r), -1.57601540344632342236, TEST_TOL0,
GSL_SUCCESS);
  TEST_SF(s, gsl_sf_atanint_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS);

The latter special case is added to the test cases.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67774>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to