diff options
| author | Julian Weigt <juw@posteo.de> | 2025-12-28 11:19:41 +0000 |
|---|---|---|
| committer | Julian Weigt <juw@posteo.de> | 2026-02-04 15:55:48 +0100 |
| commit | e65748fa8908c46ae2e6af7ef63d28fb3427238d (patch) | |
| tree | b6bb555a9bc84b21c7d2af7456964c9bf3922637 /charf.c | |
| parent | 32c7a6e84f67ec44fbb1b32801271aa096f407b2 (diff) | |
Remove old rough error counting.
Diffstat (limited to 'charf.c')
| -rw-r--r-- | charf.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -132,15 +132,9 @@ void compute(EXPTYPE p, int t){ //if(i%3==0) f[2*N+i+K/2] = 1; } - double max = 1.0; - unsigned int max_operations_per_variable = 1; - VALUETYPE Mf[D]; compute_maximalfunction(f, Mf); - max_operations_per_variable += (D-1)*(1+max_operations_per_variable); //sum of nominators and denominators - max_operations_per_variable += 2*(1+max_operations_per_variable)+1; //division of nominator and denominator - /*Allocate memory for derivatives.*/ VALUETYPE df[D]; VALUETYPE dMf[D]; @@ -149,10 +143,6 @@ void compute(EXPTYPE p, int t){ differentiate(f,df); differentiate(Mf,dMf); - max = max*(1<<K); //times 2^K - for(int i=1; i<= K; i++) max_operations_per_variable = max_operations_per_variable*2+1; - - /*Print derivatives*/ /* for(int k=0;k<=K;k++){ @@ -169,18 +159,12 @@ void compute(EXPTYPE p, int t){ VALUETYPE intdfp = integratep(df,p); VALUETYPE intdMfp = integratep(dMf,p); - max = D*pow(max,p); - max_operations_per_variable = D*(max_operations_per_variable+1) + D-1 + 1; //printf("%d: %f / %f = %f\n",k,intdMfp[k],intdfp[k],intdMfp[k]/intdfp[k]); /*Compute ||Mf^{(k)}||_p/||f^{(k)}||_p.*/ - double divisor = to_double(intdfp); - VALUETYPE r = ratio(intdMfp, intdfp); - max_operations_per_variable = 2*max_operations_per_variable+1; - //printf("%.3d: %.3f \n",t,r); /*Print f and ||Mf^{(k)}||_p/||f^{(k)}||_p if the latter is close to 1/2.*/ //if(to_double(r)>.4997) @@ -190,7 +174,6 @@ void compute(EXPTYPE p, int t){ for(int i=0;i<D;i++) printf("%1.0f ",to_double(f[i])); printf("\n"); printf("%.4f\n",to_double(r)); - if(!EXACT) printf("max error: %u * %.1f * 2^{-51} / %f = %.12f\n", max_operations_per_variable, max, divisor, max_operations_per_variable*max/divisor*pow(2.0,-51)); } } |
