Changeset 197260f in sasview
- Timestamp:
- Mar 24, 2016 3:37:55 AM (9 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 273a6d7
- Parents:
- 75898d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/c_extensions/libfunc.c
r75898d4 r197260f 236 236 237 237 /** 238 Implements eq 6.2.5 (small gamma) of Numerical Recipes in C, essentially 239 the incomplete gamma function multiplied by the gamma function. 240 Required for implementation of fast error function (erf) 241 **/ 242 243 /* 238 Wojtek's comment Mar 22 2016: The remaing code can mostly likely be deleated 239 Keeping it in order to check if it is not breaking anything 240 **/ 241 242 244 243 #define ITMAX 100 245 244 #define EPS 3.0e-7 … … 250 249 float sum,del,ap; 251 250 252 *gln = gamln(a);251 *gln = lgamma(a); 253 252 if(x <= 0.0) { 254 253 if (x < 0.0) printf("Error: x less than 0 in routine gser"); … … 275 274 276 275 } 277 */278 276 279 277 /** … … 281 279 representation 282 280 **/ 283 /*284 281 void gcf(float *gammcf, float a, float x, float *gln) { 285 282 int i; 286 283 float an,b,c,d,del,h; 287 284 288 *gln = gamln(a);285 *gln = lgamma(a); 289 286 b = x+1.0-a; 290 287 c = 1.0/FPMIN; … … 307 304 return; 308 305 } 309 */310 306 311 307 /** 312 308 Represents incomplete error function, P(a,x) 313 309 **/ 314 /*315 310 float gammp(float a, float x) { 316 311 float gamser,gammcf,gln; … … 324 319 } 325 320 } 326 */327 321 /** 328 322 Implementation of the error function, erf(x) 329 323 **/ 330 /*331 324 float erff(float x) { 332 325 return x < 0.0 ? -gammp(0.5,x*x) : gammp(0.5,x*x); 333 326 } 334 */
Note: See TracChangeset
for help on using the changeset viewer.