Ignore:
Timestamp:
Mar 24, 2016 3:37:55 AM (9 years ago)
Author:
wojciech
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
Message:

Libfunc cleaned up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/calculator/c_extensions/libfunc.c

    r75898d4 r197260f  
    236236 
    237237/** 
    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 /* 
     238Wojtek's comment Mar 22 2016: The remaing code can mostly likely be deleated 
     239Keeping it in order to check if it is not breaking anything 
     240**/ 
     241 
     242 
    244243#define ITMAX 100 
    245244#define EPS 3.0e-7 
     
    250249  float sum,del,ap; 
    251250 
    252   *gln = gamln(a); 
     251  *gln = lgamma(a); 
    253252  if(x <= 0.0) { 
    254253    if (x < 0.0) printf("Error: x less than 0 in routine gser"); 
     
    275274 
    276275} 
    277 */ 
    278276 
    279277/** 
     
    281279   representation 
    282280**/ 
    283 /* 
    284281void gcf(float *gammcf, float a, float x, float *gln) { 
    285282  int i; 
    286283  float an,b,c,d,del,h; 
    287284 
    288   *gln = gamln(a); 
     285  *gln = lgamma(a); 
    289286  b = x+1.0-a; 
    290287  c = 1.0/FPMIN; 
     
    307304  return; 
    308305} 
    309 */ 
    310306 
    311307/** 
    312308   Represents incomplete error function, P(a,x) 
    313309**/ 
    314 /* 
    315310float gammp(float a, float x) { 
    316311  float gamser,gammcf,gln; 
     
    324319  } 
    325320} 
    326 */ 
    327321/** 
    328322    Implementation of the error function, erf(x) 
    329323**/ 
    330 /* 
    331324float erff(float x) { 
    332325  return x < 0.0 ? -gammp(0.5,x*x) : gammp(0.5,x*x); 
    333326} 
    334 */ 
Note: See TracChangeset for help on using the changeset viewer.