From e1dc1ede438c49a56f649026e95be807c95a1c54 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Mon, 23 Feb 2026 16:46:13 +0000 Subject: Add case of generating the function 11100100 which seems to be the smallest for which ||Mf^(k)||/||f^(k)|| goes to infinity with k. --- charf.c | 22 +++++++++++++++++++--- double.c | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/charf.c b/charf.c index 0028dc5..e48bf9f 100644 --- a/charf.c +++ b/charf.c @@ -266,6 +266,21 @@ int generate_each_charf(VALUETYPE* f, index_t i){ else return 0; } +int generate_infinity_example(VALUETYPE* f, index_t i){ + if(i==0){ + f[0] = int_to_valuetype(1); + f[1] = int_to_valuetype(1); + f[2] = int_to_valuetype(1); + f[3] = int_to_valuetype(0); + f[4] = int_to_valuetype(0); + f[5] = int_to_valuetype(1); + f[6] = int_to_valuetype(0); + f[7] = int_to_valuetype(0); + return 8; + } + else return -1; +} + int generate_triangle(VALUETYPE* f, index_t i){ int j = i+1; if(j <= N/2){ @@ -287,6 +302,7 @@ int generate_random(VALUETYPE* f, index_t i){ /*Writes into f the values of the function indexed by i. Returns the size of the support of f, or -1 if there is no function with that index.*/ int generate_function(VALUETYPE* f, index_t i){ return generate_each_charf(f,i); + //return generate_infinity_example(f,i); //return generate_random(f,i); //return generate_triangle(f,i); } @@ -331,8 +347,8 @@ void format_result(char* s, index_t index, int k, EXPTYPE p, VALUETYPE r, int fo } } for(int m=0; m+1<=k; m++){ - differentiate(df[(m+1)%2],df[m%2],d,1); - differentiate(dMf[(m+1)%2],dMf[m%2],d,1); + differentiate(df[m%2],df[(m+1)%2],d,1); + differentiate(dMf[m%2],dMf[(m+1)%2],d,1); l += sprintf(s+l,"\nf%d: ",m+1); for(int i=0; i