# HG changeset patch # User vitor # Date 1216334541 0 # Node ID f3923fea3a8ca303650793449668b7cc14c43345 # Parent bf3952d5e76c77a7e9497c58b74274800c66cada Simplify diff -r bf3952d5e76c -r f3923fea3a8c ra288.c --- a/ra288.c Thu Jul 17 22:39:29 2008 +0000 +++ b/ra288.c Thu Jul 17 22:42:21 2008 +0000 @@ -108,13 +108,10 @@ if ((f0 = *in) <= 0) return 0; - for (x=1 ; ; x++) { + for (x=1; x <= n; x++) { float *p1 = in + x; float *p2 = tgt; - if (n < x) - return 1; - f1 = *(p1--); for (y=0; y < x - 1; y++) @@ -131,6 +128,8 @@ if ((f0 += f1*f2) < 0) return 0; } + + return 1; } /* product sum (lsf) */