Igor Schein on Fri, 20 Aug 1999 10:47:00 -0400

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bnfclgp

On Fri, Aug 20, 1999 at 03:28:52PM +0100, Kevin Buzzard wrote:
> Q3 [finally on topic]: the loop above gets stuck at d=-288.
> bnfclgp(-288)

quadclassunit(D,{flag = 0},{tech = []}):

   Buchmann-McCurley's  sub-exponential  algorithm  for computing the
class group of a quadratic field of discriminant  D.   If D is not
fundamental,  the result is undefined,  but usually correct  (a
warning is issued). The more general function bnrinit should be used
to compute the class group of an order. 

So the result is undefined for non-fundamental discriminants, and
that's why you're hitting infinite loop.

I usually do it something like this:

for(k=2,N,if(isfundamental(k),print(k," ",quadclassunit(k)),))