summaryrefslogtreecommitdiff
path: root/charf.c
diff options
context:
space:
mode:
authorJulian Weigt <juw@posteo.de>2026-01-09 18:08:38 +0000
committerJulian Weigt <juw@posteo.de>2026-02-04 15:55:52 +0100
commit6f1ba57b3f0b4121ee4806b6c1a3aa578bfb4d97 (patch)
tree45288e2d919a70ef7b7d61bb73b30762e0840c38 /charf.c
parent19474ebf54b417771828c0bb1484bfabd9be3a93 (diff)
Skip computations for first derivative and threshold check.
Diffstat (limited to 'charf.c')
-rw-r--r--charf.c6
1 files 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])){