2007/8/11, Jonathan Bober <[EMAIL PROTECTED]>: > cdef class RealQuadDoubleField_class(Field): > """ > Real Quad Double Field > """ > > def __init__(self): > fpu_fix_start(self.cwf) > > def __dealloc__(self): > fpu_fix_end(self.cwf) > > [etc] > > __dealloc__() is never called until sage exits, however, since a global > instance of this class is created at startup. This means that all
I didn't realize this, but I don't think RealQuadDoubleField_class needs to set the flags. If one looks at the QuadDoubleElement class, the fpu_fix_*() functions are called every time a quad double number is created and destroyed, which I think is more appropriate. This might be the solution. I haven't actually checked this though (it's late here...). > (3a)What I think might be the best idea, at least on Linux, is to change > the compilation settings for quad double so that the fpu fix is not > needed. There are two ways to do this: If a processor supports sse2, > then passing gcc -march=whatever -msse2 -mfpmath=sse (maybe the -march > isn't needed) will cause gcc to use sse registers and instructions for > doubles, and these have the proper precision. In fact, gcc already does > this by default for x86-64 cpus, so the quad double package doesn't even Yes, the fpu_fix_() functions are meant to only work around the "weird" (depending on your perspective) behavior of x86 cpus. didier --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---