On Tue, Aug 11, 2009 at 5:02 PM, Peter Jeremy<peterjer...@optushome.com.au> wrote: > On 2009-Aug-11 07:05:42 +1000, Peter Jeremy <peterjer...@optushome.com.au> > wrote: >>I thought I saw a csin() during the build so I'll investigate and >>add code as necessary. > > The relevant error in "devel/sage/sage/ext/fast_callable.pyx" is: > ImportError: > /usr/home/peter/sage-4.1.1.rc2/local/lib/python/site-packages/sage/ext/interpreters/wrapper_cdf.so: > Undefined symbol "csin" > > csin is defined in libgfortran.so but for some reason, wrapper_cdf.so > isn't linked against it. I will need to learn more about the cython > build process to understand why. > >>>> * Incorrect signs on imaginary parts >>>Are they very small imaginary parts? >> >>Unfortunately, no. I will have to investigate both this and the >>period_lattice.py test failures. Identical numeric parts with an >>incorrect sign is worrying. > > As an example (devel/sage/sage/rings/number_field/number_field.py): > Expected: > [ > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> -0.62996052494743... - 1.09112363597172*I, > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> -0.62996052494743... + 1.09112363597172*I, > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> 1.25992104989487 > ] > Got: > [ > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> -0.629960524947437 + 1.09112363597172*I, > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> -0.629960524947436 - 1.09112363597172*I, > Ring morphism: > From: Number Field in a with defining polynomial x^3 - 2 > To: Complex Field with 53 bits of precision > Defn: a |--> 1.25992104989487 > ] > > I think I'll need some assistance with this one as I don't > understand the maths involved.
Just a quick remark-- what's happening is that Sage is just finding the three double-precision roots of the polynomial x^3 - 2 (via PARI I suspect, but maybe via GSL?). The roots are all correct, but due to some very slight numerical noise (?) they are being ordered differently. The output on freebsd is thus mathematically correct. > >>>You just have to implement a "get_memory_usage" function in misc/somewhere. >> >>Thanks. I'll look into this. It shouldn't be too difficult. > > The correct approach would be to call kvm_getprocs() and use > the returned ki_size field. Unfortunately, this means linking > against an additional shared library (-lkvm) and I'm not sure how > to manage this - the existing darwin code just adds .c, .h and .pyx > files and references them in sage-4.1.1.rc2/module_list.py - the > rest is done automatically and I'm not sure how to add a library. > > -- > Peter Jeremy > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---