Ignore:
Timestamp:
Dec 7, 2011 1:39:05 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
feadd6f
Parents:
2605da22
Message:

Re #4 Get rid of warnings by putting static and defs in the right place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/libigor/libSphere.c

    r34c2649 r5f0dcab  
    88#include "GaussWeights.h" 
    99#include "libSphere.h" 
     10 
     11 
     12static double 
     13gammln(double xx) { 
     14    double x,y,tmp,ser; 
     15    static double cof[6]={76.18009172947146,-86.50532032941677, 
     16    24.01409824083091,-1.231739572450155, 
     17    0.1208650973866179e-2,-0.5395239384953e-5}; 
     18    int j; 
     19 
     20    y=x=xx; 
     21    tmp=x+5.5; 
     22    tmp -= (x+0.5)*log(tmp); 
     23    ser=1.000000000190015; 
     24    for (j=0;j<=5;j++) ser += cof[j]/++y; 
     25    return -tmp+log(2.5066282746310005*ser/x); 
     26} 
     27 
     28static double 
     29LogNormal_distr(double sig, double mu, double pt) 
     30{ 
     31  double retval,pi; 
     32 
     33  pi = 4.0*atan(1.0); 
     34  retval = (1.0/ (sig*pt*sqrt(2.0*pi)) )*exp( -0.5*(log(pt) - mu)*(log(pt) - mu)/sig/sig ); 
     35  return(retval); 
     36} 
     37 
     38static double 
     39Gauss_distr(double sig, double avg, double pt) 
     40{ 
     41  double retval,Pi; 
     42 
     43  Pi = 4.0*atan(1.0); 
     44  retval = (1.0/ (sig*sqrt(2.0*Pi)) )*exp(-(avg-pt)*(avg-pt)/sig/sig/2.0); 
     45  return(retval); 
     46} 
     47 
     48static double SchulzPoint(double x, double avg, double zz) { 
     49    double dr; 
     50    dr = zz*log(x) - gammln(zz+1.0)+(zz+1.0)*log((zz+1.0)/avg)-(x/avg*(zz+1.0)); 
     51    return (exp(dr)); 
     52}; 
     53 
    1054 
    1155// scattering from a sphere - hardly needs to be an XOP... 
Note: See TracChangeset for help on using the changeset viewer.