> On Jul 25, 2007, at 6:06 PM, Neal Harris <[EMAIL PROTECTED]> wrote: > > > > > Hi All, > > > > I'm running 2.7.1 in OS X. In trying to compute a certain > > discriminant, I ran into the following error: > > > > sage: K.<t> = NumberField(x^3 + x^2 - 2*x + 8) > > sage: b = K.integral_basis() > > sage: b > > [1, t, 1/2*t^2 + 1/2*t] > > sage: K.disc() > > -503 > > sage: b2 = [1, t, t^2] > > sage: K.disc(b2) > > --- > > --- > > --------------------------------------------------------------------- > > <type 'exceptions.NameError'> Traceback (most recent call > > last) > > > > /Users/neal/<ipython console> in <module>() > > > > /Applications/sage-2.7.1/local/lib/python2.5/site-packages/sage/rings/ > > number_field/number_field.py in discriminant(self, v) > > 482 return self.__disc > > 483 else: > > --> 484 return Q(self.trace_pairing(v).det()) > > 485 > > 486 disc = discriminant > > > > <type 'exceptions.NameError'>: global name 'Q' is not defined > > > > Now, I immediately saw from line 484 that I only had to call > > K.trace_pairing(b2).det() to get what I wanted: > > > > sage: K.trace_pairing(b2).det() > > -2012 > > > > > > But what is Q supposed to be there?
It's a bug, which I've now fixed. Thanks! See attached patch or in sage-2.7.1 do hg_sage.pull(), sage -br, etc. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-forum URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
disc.patch
Description: Binary data
