home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / sci / math / 17561 < prev    next >
Encoding:
Text File  |  1992-12-31  |  729 b   |  30 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!caen!hellgate.utah.edu!fcom.cc.utah.edu!news
  3. From: NAHAJ@CC.UTAH.EDU (John B 'Nahaj' Halleck, UUCC)
  4. Subject: What is this factoring method called??
  5. Message-ID: <1992Dec31.221329.12648@fcom.cc.utah.edu>
  6. Sender: news@fcom.cc.utah.edu
  7. Organization: UNIVERSITY OF UTAH COMPUTER CENTER
  8. Date: Thu, 31 Dec 92 22:13:29 GMT
  9. X-News-Reader: VMS NEWS 1.24
  10. Lines: 18
  11.  
  12. What is this factoring method called?  Where can I read up on it?
  13. (email me and I'll post a summary)
  14.  
  15.  p = isqrt(n);
  16.  q = p; 
  17.  quess = p*q;
  18.  
  19.  while guess <> n do
  20.    if guess > n then
  21.       guess = guess - p;
  22.       q = q - 1;
  23.    else
  24.       guess = guess + q;
  25.       p = p + 1;
  26.    endif
  27.  end while
  28.  
  29.  print ("The factors are: ", p, q );
  30.