Show
Ignore:
Timestamp:
01/17/07 00:38:49 (4 years ago)
Author:
anthony_rowe
Message:

added ilp functions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/projects/polly/lreg.c

    r340 r343  
    114114 
    115115    // standard deviation of the points 
    116     double stddevPoints = isqrt( (SSyy - b * SSxy)/(size-2) ); 
     116   // printf( "1 sqrt( %f )=",(SSyy - b * SSxy)/(size-2)); 
     117   // double stddevPoints = isqrt( (SSyy - b * SSxy)/(size-2) ); 
     118   // printf( "%f\n",stddevPoints); 
    117119 
    118120    // Error of the slope 
    119     double bError = stddevPoints / isqrt( SSxx ); 
     121   // printf( "2 sqrt( %f )=",SSxx); 
     122   // double bError = stddevPoints / isqrt( SSxx ); 
     123   // printf( "%f\n",isqrt( SSxx)); 
    120124 
    121125    double r2Numerator = (size * Sxy) - (Sx * Sy); 
     
    123127    double r2 = (r2Numerator * r2Numerator) / r2Denominator; 
    124128 
    125     double signB = (b < 0) ? -1.0 : 1.0; 
    126     printf( "signB = %f r2 = %f\n",signB,r2); 
    127     double r = signB * isqrt( r2*10000 ); 
     129    //double signB = (b < 0) ? -1.0 : 1.0; 
     130    //printf( "3 sqrt(%f)=",r2); 
     131    //double r = signB * isqrt(r2); 
     132    //printf( "%f\n",r); 
    128133 
    129     reg_out->r = r;  
     134    reg_out->r_sqr = r2;  
    130135    reg_out->a = a;  
    131136    reg_out->b = b;  
    132     reg_out->bError = bError;  
    133     reg_out->stddevPoints= stddevPoints;  
     137    reg_out->bError = 0;  
     138    reg_out->stddevPoints= 0;  
     139    //reg_out->bError = bError;  
     140    //reg_out->stddevPoints= stddevPoints;  
    134141  } // if N > 0 
    135142