From 6f1ba57b3f0b4121ee4806b6c1a3aa578bfb4d97 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Fri, 9 Jan 2026 18:08:38 +0000 Subject: Skip computations for first derivative and threshold check. --- charf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charf.c b/charf.c index 2552b06..c849c55 100644 --- a/charf.c +++ b/charf.c @@ -138,7 +138,9 @@ void compute(EXPTYPE p, int D, VALUETYPE* f, VALUETYPE* records){ } - for(int k=1; k<=K; k++){ + differentiate(df[0],df[1],D,1); + differentiate(dMf[0],dMf[1],D,1); + for(int k=2; k<=K; k++){ /*Compute kth derivative of f and Mf from (k-1)th derivative*/ differentiate(df[(k+1)%2],df[k%2],D,1); differentiate(dMf[(k+1)%2],dMf[k%2],D,1); @@ -167,7 +169,7 @@ void compute(EXPTYPE p, int D, VALUETYPE* f, VALUETYPE* records){ double t = to_double(r); if( - over_threshold_charf(t,k) && + //over_threshold_charf(t,k) && is_greater(r,records[k])){ /*extra check for printing only because in error mode for some reason floats randomly seem to increase by tiny amounts*/ if(t>to_double(records[k])){ -- cgit v1.2.3