Changeset 96f9be8 in git


Ignore:
Timestamp:
Sep 14, 2009, 11:06:09 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d5b180e0c68f700e7e5a884ae1c4b0015e6fd9a8
Parents:
d317a90d4242efb5169bc024c79fc9c4937bc022
Message:
* IsPrime tests divisibility by primes from factory: smallprimes (<=32749)
  If candidate is larger than 32749^2, we test now by all uneven
  numbers in 32749..sqrt(cand)


git-svn-id: file:///usr/local/Singular/svn/trunk@12096 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    rd317a9 r96f9be8  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.210 2009-09-01 08:05:36 seelisch Exp $ */
     4/* $Id: ipshell.cc,v 1.211 2009-09-14 09:06:09 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    556556    if (j > end_p) return p;
    557557  }
     558#ifdef HAVE_FACTORY
     559  if (i>=end_i)
     560  {
     561    while(j<=end_p)
     562    {
     563      j+=2;
     564      if ((p%j) == 0)
     565      {
     566        if (p<=32751) return iiIsPrime0(p-2);
     567        p-=2;
     568        goto restart;
     569      }
     570    }
     571  }
     572#endif
    558573  return p;
    559574}
Note: See TracChangeset for help on using the changeset viewer.