From 982368c5ef846892f6ee246c3011ae52f483ff67 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 25 Jan 2022 02:09:04 +0000 Subject: Fix incorrect output git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4258 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/specialty/pgmabel.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'editor') diff --git a/editor/specialty/pgmabel.c b/editor/specialty/pgmabel.c index aa748f88..5badfd19 100644 --- a/editor/specialty/pgmabel.c +++ b/editor/specialty/pgmabel.c @@ -100,20 +100,19 @@ abel ( float *y, int N, double *adl) { register int n; double *rho, *rhop; /* results and new index */ - float *yp; /* new indizes for the y-array */ MALLOCARRAY(rho, N); if( !rho ) pm_error( "out of memory" ); + for (n=0 ; n 2) rhop[n-1] = (rho[n-2]+rho[n-1]+rho[n])/3.0; stabilization*/ + rhop[n] = MAX(0, (y[n] - Sum(n,rho,N,adl))/(adl[n*N+n])); + /* Clip to 0 for error correction ! */ } for (n=0 ; n