[xiph-commits] r17997 - trunk/chirptest

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon May 23 08:02:01 PDT 2011


Author: xiphmont
Date: 2011-05-23 08:02:01 -0700 (Mon, 23 May 2011)
New Revision: 17997

Modified:
   trunk/chirptest/chirp.c
Log:
Change overflow handling for test runs.



Modified: trunk/chirptest/chirp.c
===================================================================
--- trunk/chirptest/chirp.c	2011-05-22 11:21:35 UTC (rev 17996)
+++ trunk/chirptest/chirp.c	2011-05-23 15:02:01 UTC (rev 17997)
@@ -276,14 +276,12 @@
       eP += ddAtoEi(c->P,c->ddA);
       fP += ddAtoFi(c->P,c->ddA);
 
-      /* guard overflow; if we're this far out, assume we're never
-         coming back. drop out now. */
+      /* guard overflow */
       if((aP*aP + bP*bP)>1e10 ||
          (cP*cP + dP*dP)>1e10 ||
          (eP*eP + fP*fP)>1e10){
-        iter_limit=0;
-        i=n;
-        break;
+        flag=1;
+        continue;
       }
 
       {
@@ -577,13 +575,12 @@
       ei[i] += tmpe;
       fi[i] += tmpf;
 
-      /* guard overflow; if we're this far out, assume we're never
-         coming back. drop out now. */
+      /* guard overflow */
       if((ai[i]*ai[i] + bi[i]*bi[i])>1e10 ||
          (ci[i]*ci[i] + di[i]*di[i])>1e10 ||
          (ei[i]*ei[i] + fi[i]*fi[i])>1e10){
-        iter_limit=0;
-        i=n;
+        flag=1;
+        continue;
       }
 
       /* save new estimate */
@@ -831,13 +828,12 @@
       }
 
 
-      /* guard overflow; if we're this far out, assume we're never
-         coming back. drop out now. */
+      /* guard overflow */
       if((ai[i]*ai[i] + bi[i]*bi[i])>1e10 ||
          (ci[i]*ci[i] + di[i]*di[i])>1e10 ||
          (ei[i]*ei[i] + fi[i]*fi[i])>1e10){
-        iter_limit=0;
-        i=n;
+        flag=1;
+        continue;
       }
 
       ai[i] += tmpa;



More information about the commits mailing list