Show
Ignore:
Timestamp:
01/16/07 10:31:41 (2 years ago)
Author:
peter
Message:

source/service.cpp

  • Bug-fix. Fix problem in e2() with negative return values for very large tau.

source/thirdparty_bevington.cpp
source/conv_eden_ioniz.cpp
source/thirdparty.cpp
source/thirdparty.h

  • Replace Bevington linfit routine with open source version.
  • Bug-fix. Replace call to y0() -> bessel_y0(), y1() -> bessel_y1() in bessel_yn().
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/service.cpp

    r785 r786  
    302302{ 
    303303        /* use recurrence relation */ 
    304         return exp_mt - t*ee1(t); 
     304        /* ignore exp_mt, it is *very* unreliable */ 
     305        /* guard against negative results, this can happen for very large t */ 
     306        return max(sexp(t) - t*ee1(t),0.); 
    305307} 
    306308 
     
    336338        { 
    337339                /* abs. accuracy better than 2e-7 */ 
    338 /*              ans = a[0] + a[1]*x + a[2]*x*x + a[3]*powi(x,3) + a[4]*powi(x,4) +  */ 
    339 /*                a[5]*powi(x,5) - log(x); */ 
    340340                ans = ((((a[5]*x + a[4])*x + a[3])*x + a[2])*x + a[1])*x + a[0] - log(x); 
    341341        } 
     
    345345        { 
    346346                /* abs. accuracy better than 2e-8 */ 
    347 /*              top = powi(x,4) + b[0]*powi(x,3) + b[1]*x*x + b[2]*x + b[3]; */ 
    348347                top = (((x + b[0])*x + b[1])*x + b[2])*x + b[3]; 
    349 /*              bot = powi(x,4) + c[0]*powi(x,3) + c[1]*x*x + c[2]*x + c[3]; */ 
    350348                bot = (((x + c[0])*x + c[1])*x + c[2])*x + c[3]; 
    351                 /*  
    352                  *>>>chng 98 dec 17 
     349                /*>>>chng 98 dec 17 
    353350                 * Jason's original implementation did not require the exp since 
    354                  * the routines that used this knew if was not present.   
    355                  * put in for safely. 
    356                   
    357                 ans = top/bot/x;*/ 
     351                 * the routines that used this knew it was not present.   
     352                 * put in for safety. */ 
    358353                ans = top/bot/x*sexp(x); 
    359354        }