changeset 33387:4bb532314db1

__isprimelarge__.cc: Remove panic_unless from GCD code
author Arun Giridhar <arungiridhar@gmail.com>
date Fri, 12 Apr 2024 17:47:16 -0400
parents e28b0e670d18
children 40ce340349e0 c714266d9f0d
files libinterp/corefcn/__isprimelarge__.cc
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/__isprimelarge__.cc	Fri Apr 12 15:59:30 2024 -0400
+++ b/libinterp/corefcn/__isprimelarge__.cc	Fri Apr 12 17:47:16 2024 -0400
@@ -241,10 +241,7 @@
         return pollardrho (n, c + 2);
 
       if (g > 1)  // found GCD ==> exit loop properly
-        {
-          panic_unless (n % g == 0);  // theoretical possibility of GCD error
-          return g;
-        }
+        return g;
     }
 }