bug-gsl
[Top][All Lists]
Advanced

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

Report floating-point exceptions and supply fix suggestions in 30 specia


From: 易昕
Subject: Report floating-point exceptions and supply fix suggestions in 30 special functions in specfunc of GSL(version 2.6)
Date: Sat, 9 May 2020 14:35:51 +0800

Based on static value analysis and dynamical detection, we found 30
functions in specfunc of GSL (version 2.6) exists
floating-point exceptions that need to be repaired and we supply some fix
suggestions.

All functions are checked by mpmath under mp.dps = 1000
We think a floating-point exception need to be repaired based on following
conditions:
1. GSL function return GSL_SUCCESS
2. GSL function result.val = nan or inf
3. the error between mathematical function and GSL function is big

We classifier exceptions based on the output of mathematical function
(based on mpmath).
In above conditions, if x trigger a floating-point exception in GSL
function, and correspond math results is belong to floating-point number
(exception NaN and inf), we say the exception is avoidable.
for example, for the function gsl_sf_bessel_i0_scaled_e, for the input
-8.988465674311579e+307
results should be 5.56268464627e-309, we supply following suggestion:
- result->val = 1.0/(2.0*ax);
+ result->val = 0.5/ax;
However, some functions cannot be repaired in such a simple way, e.g.
gsl_sf_dilog_e, we suggest by building a new branch to report exceptions
based on the localized input domains, which can also improve the
performance of function over the localized input domains.

On the other hand, if math results is belong to NaN or inf, we say the
exception is unavoidable, the only way is add new branch to report
exceptions.

The critical informations are localized input domains that can tigger
floating-point exceptions, we supply all we localized input domains for 30
functions and show input domains in graph like this:
[image: gsl_sf_bessel_i2_scaled_e.png]
Where red parts are localized input domains, bule parts are input domain
that no exceptions are detected, black part means function will not return
GSL_SUCCESS.
And we also supply test oracle function from mpmath for you can check the
floating-point exceptions problem.
We plan to analysis more functions in the future, we hope this informations
can help improving GSL.


************************************************************************************

Function name: *gsl_sf_dilog_e*
Localized inputs domain: [-1.7976931348623157e+308,
-1.3407807929942596e+154]
[image: gsl_sf_dilog_e.png]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 536
    + if((x<=-1.3407807929942596e+154)&&(x>=-1.7976931348623157e+308)){
    +    DOMAIN_ERROR(result);
    + }
Reason analysis:
    line 543 in dilog.c: overflow in "x*x" of int stat_d2 = dilog_xge0(x*x,
&d2);
Test oracle function: lambda x: polylog(2,x)


Function name: *gsl_sf_bessel_i0_scaled_e*
Localized inputs domain: [-1.7976931348623157e+308, -8.988465674311579e+307]
[image: gsl_sf_bessel_i0_scaled_e.png]
Localized exceptions type: avoidable
Recommend repair:
    add in line 92 of of bessel_i.c
    - result->val = 1.0/(2.0*ax);
    + result->val = 0.5/ax;
Reason analysis:
    line 92 in bessel_i.c: overflow in "(2.0*ax)" of "result->val =
1.0/(2.0*ax);"
Test oracle function: lambda x:
re(fmul(exp(-fabs(x)),besseli(0.5,x)/sqrt(fmul(2.0,x)/pi),exact=True))


Function name: *gsl_sf_bessel_i1_scaled_e*
Localized inputs domain: [-1.7976931348623157e+308,
-1.3407807929942597e+154]
[image: gsl_sf_bessel_i1_scaled_e.png]
Localized exceptions type: avoidable
Recommend repair:
    add in line 128 of bessel_i.c
    if((x<=-1.3407807929942597e+154)&&(x>=-1.7976931348623157e+308)){
        result->val = (0.5/ax) * ((ax*(1.0+ex) - (1.0-ex)) / ax);
    }
Localized inputs domain: [1.3407807929942597e+154, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 128 of bessel_i.c
    if((x<=1.7976931348623157e+308)&&(x>=1.3407807929942597e+154)){
      result->val = (0.5/ax) * ((ax*(1.0+ex) - (1.0-ex)) / ax);
    }
Reason analysis:
    line 128 in bessel_i.c: overflow in "(ax*ax)" of "result->val = 0.5 *
(ax*(1.0+ex) - (1.0-ex)) / (ax*ax);"
Test oracle function: lambda x:
re(fmul(exp(-fabs(x)),fdiv(besseli(1.5,x),sqrt(fmul(2.0,x)/pi)),exact=True))


Function name: *gsl_sf_bessel_i2_scaled_e*
[image: gsl_sf_bessel_i2_scaled_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.643803094122362e+102]
Localized exceptions type: avoidable
Recommend repair:
    add in line 166 of bessel_i.c
    if((x<=1.7976931348623157e+308)&&(x>=5.643803094122362e+102)){
        result->val = (0.5/ax)*(3.0/ax + ax - 3.0*x/ax)*(1.0/ax);
    }

Localized inputs domain: [5.643803094122362e+102, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 166 of bessel_i.c
    if((x<=1.7976931348623157e+308)&&(x>=5.643803094122362e+102)){
        result->val = (0.5/ax)*(3.0/ax + ax - 3.0*x/ax)*(1.0/ax);
    }
Reason analysis:
    line 165 in bessel_i.c: overflow in "(x*x)" of "double x2 = x*x;"
    line 166 in bessel_i.c: overflow in "(ax*ax)" of "0.5 *
((3.0+x2)*(1.0-ex) - 3.0*ax*(1.0+ex))/(ax*ax*ax);"
Test oracle function:
re(fmul(exp(-fabs(x)),fdiv(besseli(2.5,x),sqrt(fmul(2.0,x)/pi)),exact=True))


Function name: *gsl_sf_bessel_y0_e*
[image: gsl_sf_bessel_y0_e.png]
Localized inputs domain: [2.0409843227309678e+39, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    line 89 of bessel_y.c
    - const int stat = gsl_sf_cos_e(x, &cos_result);
    + double cos_result.val = cos(x);
    + double cos_result.err = 0.0;
    + const int stat_cos = 0;
Reason analysis:
    line 89 in bessel_y.c: overflow in "const int stat = gsl_sf_cos_e(x,
&cos_result);"
Test oracle function: rf34 = lambda x: fdiv(-cos(x),x)


Function name: *gsl_sf_bessel_y1_e*
[image: gsl_sf_bessel_y1_e.png]
Localized inputs domain: [9.1516257756826e+38, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    line 124 and 125 of bessel_y.c
    - const int stat_cos = gsl_sf_cos_e(x, &cos_result);
    - const int stat_sin = gsl_sf_sin_e(x, &sin_result);
    + const int stat_cos = 0;
    + const int stat_sin = 0;
    + double cos_result.val = cos(x);
    + double cos_result.err = 0.0;
    + double sin_result.val = sin(x);
    + double sin_result.err = 0.0;
Reason analysis:
    line 124 in bessel_y.c: overflow in "const int stat_cos =
gsl_sf_cos_e(x, &cos_result);"
    line 125 in bessel_y.c: overflow in "const int stat_sin =
gsl_sf_sin_e(x, &sin_result);"
Test oracle function: lambda x: -(cos(x)/x + sin(x)) / x


Function name: *gsl_sf_bessel_y2_e*
[image: gsl_sf_bessel_y2_e.png]
Localized inputs domain: [2.199735185730563e+39, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    line 164 and 165 of bessel_y.c
    - const int stat_cos = gsl_sf_cos_e(x, &cos_result);
    - const int stat_sin = gsl_sf_sin_e(x, &sin_result);
    + const int stat_cos = 0;
    + const int stat_sin = 0;
    + double cos_result.val = cos(x);
    + double cos_result.err = 0.0;
    + double sin_result.val = sin(x);
    + double sin_result.err = 0.0;
Reason analysis:
    line 164 in bessel_y.c: overflow in "const int stat_cos =
gsl_sf_cos_e(x, &cos_result);"
    line 165 in bessel_y.c: overflow in "const int stat_sin =
gsl_sf_sin_e(x, &sin_result);"
Test oracle function: lambda x: (-3/(x*x*x)+1/x)*cos(x)-(3/(x*x))*sin(x)


Function name: *gsl_sf_erf_Q_e*
[image: gsl_sf_erf_Q_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -7.098606412873811e+61]
Localized exceptions type: avoidable
Recommend repair:
    add in line 392 of erfc.c
    if((x<=-7.098606412873811e+61)&&(x>=-1.7976931348623157e+308)){
         result -> val = 1.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Localized inputs domain: [7.098606412873812e+61, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 392 of erfc.c
    if((x<=1.7976931348623157e+308)&&(x>=7.098606412873812e+61)){
         result -> val = 0.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 77 in erfc.c: invaild in "num/den;" (inf/inf)
Test oracle function: lambda x: erfc(x/sqrt(2.0))/2.0


Function name: *gsl_sf_erf_e*
Localized inputs domain: [-1.7976931348623157e+308, -5.019472731517385e+61]
Localized exceptions type: avoidable
Recommend repair:
    add in line 359 of erfc.c
    if((x<=-5.019472731517385e+61)&&(x>=-1.7976931348623157e+308)){
         result -> val = -1.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Localized inputs domain: [5.0194727315173856e+61, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 359 of erfc.c
    if((x<=1.7976931348623157e+308)&&(x>=5.0194727315173856e+61)){
         result -> val = 1.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 77 in erfc.c: invaild in "num/den;" (inf/inf)
Test oracle function: lambda x: erf(x)


Function name: *gsl_sf_erfc_e*
[image: gsl_sf_erfc_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.019472731517385e+61]
Localized exceptions type: avoidable
Recommend repair:
    add in line 257 of erfc.c
    if((x<=-5.019472731517385e+61)&&(x>=-1.7976931348623157e+308)){s
         result -> val = 2.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Localized inputs domain: [5.0194727315173856e+61, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 257 of erfc.c
    if((x<=1.7976931348623157e+308)&&(x>=5.0194727315173856e+61)){
         result -> val = 0.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 77 in erfc.c: invaild in "num/den;" (inf/inf)
Test oracle function: lambda x: erfc(x)


Function name: *gsl_sf_hazard_e*
Localized inputs domain: [-1.7976931348623157e+308, -7.098606412873811e+61]
Localized exceptions type: avoidable
Recommend repair:
    add in line 406 of erfc.c
    if((x<=-7.098606412873811e+61)&&(x>=-1.7976931348623157e+308)){
         result -> val = 0.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 77 in erfc.c: invaild in "num/den;" (inf/inf)
Test oracle function: lambda x:
fmul(sqrt(2.0/pi),exp(-power(x,2.0)/2.0),exact=True)/erfc(x/sqrt(2.0))


Function name: *gsl_sf_log_erfc_e*
[image: gsl_sf_log_erfc_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.019472731517385e+61]
Localized exceptions type: avoidable
Recommend repair:
    add in line 406 of erfc.c
    if((x<=-5.019472731517385e+61)&&(x>=-1.7976931348623157e+308)){
         result -> val = 6.931471805599452862e-01;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }

Localized inputs domain: [2.375668978229577e+51, 1.7976931348623157e+308]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 406 of erfc.c
    if((x<=1.7976931348623157e+308)&&(x>=2.375668978229577e+51)){
      OVERFLOW_ERROR(result);
    }
Reason analysis:
    line 77 in erfc.c: invaild in "num/den;" (inf/inf)
Test oracle function: lambda x: log(erfc(x))


Function name: *gsl_sf_airy_Ai_deriv_e*
[image: gsl_sf_airy_Ai_deriv_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.643803094122362e+102]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 698 of airy_der.c
    if((x<=-5.643803094122362e+102)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 704 in airy_der.c: overflow in "int status_ap =
airy_deriv_mod_phase(x, mode, &a, &p);"
    line 597 in airy_der.c: overflow in "double z = 128.0/(x*x*x) + 1.0;"
    line 626 in airy_der.c: overflow in x * sqx * p of "phi->val  = pi34 -
x * sqx * p;"
Test oracle function: lambda x: airyai(x,1)


Function name: *gsl_sf_airy_Ai_deriv_scaled_e*
Localized inputs domain: [-1.7976931348623157e+308, -5.643803094122362e+102]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 639 of airy_der.c
    if((x<=-5.643803094122362e+102)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 643 in airy_der.c: overflow in "int status_ap =
airy_deriv_mod_phase(x, mode, &a, &p);"
    line 597 in airy_der.c: overflow in "double z = 128.0/(x*x*x) + 1.0;"
    line 626 in airy_der.c: overflow in x * sqx * p of "phi->val  = pi34 -
x * sqx * p;"
Localized inputs domain: [3.1852513365225147e+205, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 683 of airy_der.c
    if((x<=1.7976931348623157e+308)&&(x>=3.1852513365225147e+205)){
         result -> val = 0.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 684 in airy_der.c: overflow in "x*sqrtx" of "const double z =
16.0/(x*sqrtx) - 1.0;"
Test oracle function:
fmul(exp(fmul(2.0/3.0,power(x,3.0/2.0),exact=True)),airyai(x,1),exact=True)
if x>0 else airyai(x,1)


Function name: *gsl_sf_airy_Ai_e*
[image: gsl_sf_airy_Ai_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.161898187620817e+26]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 661 of airy.c
    if((x<=-1.161898187620817e+26)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 667 in airy.c: overflow in "int stat_mp  = airy_mod_phase(x, mode,
&mod, &theta);"
    line 597 in airy.c: overflow in "double z = 16.0/(x*x*x) + 1.0;"
    line 626 in airy.c: overflow in x * sqx * p of "phi->val  = M_PI_4 - x
* sqx * p;"
Test oracle function: lambda x: airyai(x)


Function name: *gsl_sf_airy_Ai_scaled_e*
[image: gsl_sf_airy_Ai_scaled_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.161898187620817e+26]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 702 of airy.c
    if((x<=-1.161898187620817e+26)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 708 in airy.c: overflow in "int stat_mp  = airy_mod_phase(x, mode,
&mod, &theta);"
    line 597 in airy.c: overflow in "double z = 16.0/(x*x*x) + 1.0;"
    line 626 in airy.c: overflow in x * sqx * p of "phi->val  = M_PI_4 - x
* sqx * p;"
Localized inputs domain: [2.006582604045248e+205, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    add in line 702 of airy.c
    if((x<=1.7976931348623157e+308)&&(x>=2.006582604045248e+205)){
         result -> val = 0.0;
         result -> err = 0.0;
         return GSL_SUCCESS;
    }
Reason analysis:
    line 618 in airy.c: overflow in "double z   = 2.0/(x*sqx) - 1.0;"
    line 626 in airy.c: overflow in x * sqx * p of "phi->val  = M_PI_4 - x
* sqx * p;"
Test oracle function: lambda x:
fmul(exp(fmul(2.0/3.0,power(x,3.0/2.0),exact=True)),airyai(x),exact=True)
if x>0 else airyai(x)


Function name: *gsl_sf_airy_Bi_deriv_e*
[image: gsl_sf_airy_Bi_deriv_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.643803094122362e+102]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 815 of airy_der.c
    if((x<=-5.643803094122362e+102)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 820 in airy_der.c: overflow in "int status_ap =
airy_deriv_mod_phase(x, mode, &a, &p);"
    line 597 in airy_der.c: overflow in "double z = 128.0/(x*x*x) + 1.0;"
    line 626 in airy_der.c: overflow in x * sqx * p of "phi->val  = pi34 -
x * sqx * p;"
Test oracle function: lambda x: airybi(x,1)


Function name: *gsl_sf_airy_Bi_deriv_scaled_e*
[image: gsl_sf_airy_Bi_deriv_scaled_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -5.643803094122362e+102]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
     add in line 742 of airy_der.c
    if((x<=-5.643803094122362e+102)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 748 in airy_der.c: overflow in "int status_ap =
airy_deriv_mod_phase(x, mode, &a, &p);"
    line 597 in airy_der.c: overflow in "double z = 128.0/(x*x*x) + 1.0;"
    line 626 in airy_der.c: overflow in x * sqx * p of "phi->val  = pi34 -
x * sqx * p;"
Localized inputs domain: [3.1852513365225147e+205, 1.7976931348623157e+308]
Localized exceptions type: unavoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
     add in line 742 of airy_der.c
    if((x<=1.7976931348623157e+308)&&(x>=3.1852513365225147e+205)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 800 in airy_der.c: overflow in "const double z = 16.0/(x*sqrtx) -
1.0;"
Test oracle function: lambda x:
fmul(exp(fmul(-2.0/3.0,power(x,3.0/2.0),exact=True)),airybi(x,1),exact=True)
if x>0 else airybi(x,1)


Function name: *gsl_sf_airy_Bi_e*
[image: gsl_sf_airy_Bi_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.173447090402245e+26]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 740 of airy.c
    if((x<=-1.173447090402245e+26)&&(x>=-1.7976931348623157e+308)){
      DOMAIN_ERROR(result);
    }
Reason analysis:
    line 746 in airy.c: overflow in "int stat_mp  = airy_mod_phase(x, mode,
&mod, &theta);"
    line 597 in airy.c: overflow in "double z = 16.0/(x*x*x) + 1.0;"
    line 626 in airy.c: overflow in x * sqx * p of "phi->val  = M_PI_4 - x
* sqx * p;"
Test oracle function: lambda x: airybi(x)


Function name: *gsl_sf_airy_Bi_scaled_e*
[image: gsl_sf_airy_Bi_scaled_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.173447090402245e+26]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 797 of airy.c
    if((x<=-1.173447090402245e+26)&&(x>=-1.7976931348623157e+308)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 803 in airy.c: overflow in "int stat_mp  = airy_mod_phase(x, mode,
&mod, &theta);"
    line 597 in airy.c: overflow in "double z = 16.0/(x*x*x) + 1.0;"
    line 626 in airy.c: overflow in x * sqx * p of "phi->val  = M_PI_4 - x
* sqx * p;"
Localized inputs domain: [3.1852513365225147e+205, 1.7976931348623157e+308]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 797 of airy.c
    if((x<=1.7976931348623157e+308)&&(x>=3.1852513365225147e+205)){

      OVERFLOW_ERROR(result);

    }
Reason analysis:
    line 644 in airy.c: overflow in "double z   = 16.0/(x*sqx) - 1.0;"
Test oracle function: lambda x:
fmul(exp(fmul(-2.0/3.0,power(x,3.0/2.0),exact=True)),airybi(x),exact=True)
if x>0 else airybi(x)


Function name: *gsl_sf_legendre_P2_e*
[image: gsl_sf_legendre_P2_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -7.741001517595157e+153]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 81 of legendre_poly.c
    if((x<=-7.741001517595157e+153)&&(x>=-1.7976931348623157e+308)){

      OVERFLOW_ERROR(result);

    }
Localized inputs domain: [7.741001517595158e+153, 1.7976931348623157e+308]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 81 of legendre_poly.c
    if((x<=1.7976931348623157e+308)&&(x>=7.741001517595158e+153)){

      OVERFLOW_ERROR(result);

    }
Reason analysis:
    line 83 in legendre_poly.c: overflow in "result->val = 0.5*(3.0*x*x -
1.0);"
Test oracle function: lambda x: legendre(2,x)


Function name: *gsl_sf_legendre_P3_e*
[image: gsl_sf_legendre_P3_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -4.158389674174171e+102]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 91 of legendre_poly.c
    if((x<=-4.158389674174171e+102)&&(x>=-1.7976931348623157e+308)){

      OVERFLOW_ERROR(result);

    }
Localized inputs domain: [4.1583896741741716e+102, 1.7976931348623157e+308]
Localized exceptions type: unavoidable
Recommend repair:
    add in line 91 of legendre_poly.c
    if((x<=1.7976931348623157e+308)&&(x>=4.1583896741741716e+102)){

      OVERFLOW_ERROR(result);

    }
Reason analysis:
    line 83 in legendre_poly.c: overflow in "result->val = 0.5*x*(5.0*x*x -
3.0);"
Test oracle function: lambda x: legendre(3,x)


Function name: *gsl_sf_cos_e*
[image: gsl_sf_cos_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.1131912691690475e+39]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 238 of tirg.c
    if((x<=-1.1131912691690475e+39)&&(x>=-1.7976931348623157e+308)){

      DOMAIN_ERROR(result);

    }
Localized inputs domain: [1.2671608185123186e+39, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 238 of tirg.c
    if((x<=1.7976931348623157e+308)&&(x>=1.2671608185123186e+39)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 281 in trig.c: overflow in "result->val = 1.0 - 0.5*z*z * (1.0 -
z*z * cos_cs_result.val);"
Test oracle function: lambda x: cos(x)


Function name: *gsl_sf_sin_e*
[image: gsl_sf_sin_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -1.8258919838248544e+39]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 238 of tirg.c
    if((x<=-1.8258919838248544e+39)&&(x>=-1.7976931348623157e+308)){

      DOMAIN_ERROR(result);

    }
Localized inputs domain: [1.2671608185123186e+39, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:Wait to repair by developers, now do the performance
optimization
    add in line 238 of tirg.c
    if((x<=1.7976931348623157e+308)&&(x>=1.2671608185123186e+39)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 205 in trig.c: overflow in "result->val = z * (1.0 + z*z *
sin_cs_result.val);"
Test oracle function: lambda x: sin(x)


Function name: *gsl_sf_sinc_e*
[image: gsl_sf_sinc_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -6.457406767011778e+38]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 648 of tirg.c
    if((x<=-6.457406767011778e+38)&&(x>=-1.7976931348623157e+308)){

      DOMAIN_ERROR(result);

    }
Localized inputs domain: [2.1585753316478277e+38, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 648 of tirg.c
    if((x<=1.7976931348623157e+308)&&(x>=2.1585753316478277e+38)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 205 in trig.c: overflow in "result->val = z * (1.0 + z*z *
sin_cs_result.val);"
Test oracle function: lambda x: sinc(fmul(np.pi,x,exact=True))


Function name: *gsl_sf_exprel_2_e*
[image: gsl_sf_exprel_2_e.png]
Localized inputs domain: [709.0895657128241, 709.7827128933839]
Localized exceptions type: avoidable
Recommend repair:
    line 406 in exp.c
    - result->val = 2.0*(exp(x) - 1.0 - x)/(x*x);
    + result->val = 2.0*((exp(x) - 1.0 - x)/(x*x));
Reason analysis:
    line 406 in exp.c: overflow in "result->val = 2.0*(exp(x) - 1.0 -
x)/(x*x);"
Test oracle function: lambda x:
2.0*(fsub(exp(x),fadd(1.0,x,exact=True),exact=True))/(power(x,2.0))


Function name:* gsl_sf_psi_e*
[image: gsl_sf_psi_e.png]
Localized inputs domain: [-1.7976931348623157e+308,
-1.3407807929942597e+154]
Localized exceptions type: unavoidable
Recommend repair:
    line 612 in psi.c
    if((x<=-1.3407807929942597e+154)&&(x>=-1.7976931348623157e+308)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 388 in exp.c: overflow in "const double t = 8.0/(y*y)-1.0;"
Test oracle function: lambda x: digamma(x)


Function name: *gsl_sf_dawson_e*
[image: gsl_sf_dawson_e.png]
Localized inputs domain: [-1.7976931348623155e+307, -9.979201547673601e+291]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 227 in exp.c
    if((x<=-9.979201547673601e+291)&&(x>=-1.7976931348623155e+307)){

      DOMAIN_ERROR(result);

    }
Localized inputs domain: [9.979201547673601e+291, 1.7976931348623155e+307]
Localized exceptions type: avoidable
Recommend repair: Wait to repair by developers, now do the performance
optimization
    add in line 227 in exp.c
    if((x<=1.7976931348623155e+307)&&(x>=9.979201547673601e+291)){

      DOMAIN_ERROR(result);

    }
Reason analysis:
    line 265 in exp.c: underflow in "result->err = 2.0 * GSL_DBL_EPSILON *
result->val;"
Test oracle function: lambda x:
fmul(sqrt(pi),fmul(exp(-x*x),erfi(x),exact=True),exact=True)/2.0


Function name: *gsl_sf_Ci_e*
[image: gsl_sf_Ci_e.png]
Localized inputs domain: [6.392642836398497e+38, 1.7976931348623157e+308]
Localized exceptions type: avoidable
Recommend repair:
    line 374 and 375 in sinint.c
    - const int stat_cos = gsl_sf_cos_e(x, &cos_result);
    - const int stat_sin = gsl_sf_sin_e(x, &sin_result);
    + const int stat_cos = 0;
    + const int stat_sin = 0;
    + double cos_result.val = cos(x);
    + double cos_result.err = 0.0;
    + double sin_result.val = sin(x);
    + double sin_result.err = 0.0;
Reason analysis:
    line 374 in sinint.c: overflow in "int stat_sin = gsl_sf_sin_e(x,
&sin_result);"
    line 375 in sinint.c: overflow in "int stat_cos = gsl_sf_cos_e(x,
&cos_result);"
Test oracle function: lambda x: ci(x)


Function name: *gsl_sf_expint_E2_scaled_e*
[image: gsl_sf_expint_E2_scaled_e.png]
Localized inputs domain: [-1.7976931348623157e+308, -4.494232837155791e+307]
Localized exceptions type: avoidable
Recommend repair:
    add in line 387 in expint.c
    if((x<=-4.494232837155791e+307)&&(x>=-1.7976931348623157e+308)){
      result->val  = result_E1.val;
    }
Reason analysis:
    line 303 in expint.c: underflow in "result->err  = s * result_c.err;"
Test oracle function: lambda x: re(expint(2,x)*exp(x))

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image


reply via email to

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