From: Andrej V. <an...@us...> - 2006-05-13 01:33:37
|
Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26572 Modified Files: ifactor.lisp Log Message: - Don't print a warning if factorization of integers fails. - Give up factorization sooner to prevent unwanted delays. Index: ifactor.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/ifactor.lisp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ifactor.lisp 30 Apr 2006 02:27:29 -0000 1.4 +++ ifactor.lisp 13 May 2006 01:33:33 -0000 1.5 @@ -235,7 +235,8 @@ (let ((f (get-one-factor n))) (if (= f n) (progn - (format t "WARNING: could not find factors of composite:~%~A~%" n) + (if $ifactor_verbose + (format t "WARNING: could not find factors of composite:~%~A~%" n)) (list n)) (append (get-large-factors f) (get-large-factors (/ n f)))))) @@ -245,6 +246,13 @@ (let ((f nil) (lim_pollard $pollard_rho_limit) ($ecm_number_of_curves $ecm_number_of_curves)) + + ;; If $intfaclim is not false then we don't want to spend too much + ;; time factoring integers so we return n and leave it + ;; unfactored. The default value for $intfaclim is true, but most + ;; functions which use integer factorization set it to false. + (if (not (null $intfaclim)) + (return-from get-one-factor n)) ;; try factoring smaller factors with pollard-rho (dotimes (i $pollard_rho_tests) @@ -261,14 +269,6 @@ (if (> lim_pollard 0) (setq lim_pollard (+ $pollard_rho_limit_step lim_pollard)))) - - ;; If $intfaclim is not false then we don't want to spend too much - ;; time factoring integers so we return n and leave it - ;; unfactored. The default value for $intfaclim is true, but most - ;; functions which use integer factorization set it to false. - (if (not (null $intfaclim)) - (return-from get-one-factor n)) - ;; continue with ecm (do () (nil) (setq f (get-one-factor-ecm n)) |