From a821b9953f9386614fb7657919c431d0c90eece3 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Sat, 27 Dec 2025 09:40:19 +0000 Subject: Add error estimates. --- charf.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/charf.c b/charf.c index 1508c61..6e860ca 100644 --- a/charf.c +++ b/charf.c @@ -132,9 +132,15 @@ 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]; @@ -143,6 +149,9 @@ void compute(EXPTYPE p, int t){ differentiate(f,df); differentiate(Mf,dMf); + max = max*(1<.4997) @@ -173,6 +190,7 @@ void compute(EXPTYPE p, int t){ for(int i=0;i