Changeset 786 for trunk/source/service.cpp
- Timestamp:
- 01/16/07 10:31:41 (2 years ago)
- Files:
-
- 1 modified
-
trunk/source/service.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/service.cpp
r785 r786 302 302 { 303 303 /* 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.); 305 307 } 306 308 … … 336 338 { 337 339 /* 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); */340 340 ans = ((((a[5]*x + a[4])*x + a[3])*x + a[2])*x + a[1])*x + a[0] - log(x); 341 341 } … … 345 345 { 346 346 /* 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]; */348 347 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]; */350 348 bot = (((x + c[0])*x + c[1])*x + c[2])*x + c[3]; 351 /* 352 *>>>chng 98 dec 17 349 /*>>>chng 98 dec 17 353 350 * 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. */ 358 353 ans = top/bot/x*sexp(x); 359 354 }
