Robert, I don't understand what you suggest. Try the following: replace the line 10222 of sage/graphs/generic_graph.py with
sage: abs(M.determinant()) (the original line does not have abs()) and run sage -t -long "devel/sage/sage/graphs/generic_graph.py" You should see the result above. (sorry, I tried to make a short test to show this, but I can't: there might be some imports involved that might affect this...) Dima On Feb 3, 10:43 am, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Feb 2, 2010, at 6:32 PM, David Joyner wrote: > > > On Tue, Feb 2, 2010 at 9:26 PM, Dima Pasechnik <dimp...@gmail.com> > > wrote: > >> ... > >> sage: abs(M.determinant()) > >> Expected: > >> 712483534798848 > >> Got: > >> 7.12483534798848e14 > > > I vaguely remember that M.det() is only well-defined up to sign. > > You could rewrite the test to avoid abs, but I'm wondering if abs is > > the > > reason scientific notation is used here. Do you know? > > I think using abs is the clearest for something that's only defined up > to sign. As for the scientific notation, what's it returning here? Try > putting parent(M.det()) or type (M.det()) into the doctest. The > absolute value of integers *should* return integers... > > - Robert > > sage: z = -3**500; z > -36360291795869936842385267079543319118023385026001623040346035832580600191 > 583895484198508262979388783308179702534403855752855931517013066142992430916 > 562025780021771247847643450125342836565813209972590371590152578728008385990 > 139795377610001 > sage: abs(z) > 363602917958699368423852670795433191180233850260016230403460358325806001915 > 838954841985082629793887833081797025344038557528559315170130661429924309165 > 620257800217712478476434501253428365658132099725903715901525787280083859901 > 39795377610001 -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org