On Aug 21, 2:41 pm, "Dr. David Kirkby" <david.kir...@onetel.net> wrote: > On 08/21/10 12:00 PM, Jeroen Demeyer wrote: > > > > > > > On 2010-08-21 07:55, Carl Witty wrote: > >> On Fri, Aug 20, 2010 at 9:26 PM, Dr. David Kirkby > >> <david.kir...@onetel.net> wrote: > >>> Unless OS X rounds by default to 64-bits, I can't understand how this > >>> would > >>> have ever worked. Why was it not necessary to change the rounding behavior > >>> of an Intel based OS X system? > > >> Modern x86 family chips actually have two totally separate > >> floating-point units (at least logically, I don't know if they share > >> hardware). The older uses the "x87" instructions, dating back to the > >> 8087; this rounds to 80 bits by default. SYMPOW's fpu.c changes the > >> x87 instructions to round to 64 bits. The newer is the SSE/SSE2 > >> floating-point unit (SSE only had single-precision floating point, > >> SSE2 extended this to double precision); this rounds to 64 bits (or 32 > >> bits for single-precision instructions). > > > gcc uses SSE by default on 64-bit Intel systems and FPU by default on > > 32-bit Intel systems. However, this can be changed with gcc's -mfpmath > > option: you can choose -mfpmath=387 or -mfpmath=sse > > Thank you Carl and Jeroen. Adding the compiler option -mfpmath=sse would > probably allow SYMPOW to build on Cygwin, but of course that would only work > for > CPUs which support SSE instructions.
It's most probably impossible to find a CPU that runs a recent (non- Mobile) Windows, e.g. XP or Vista or Win7, and does not have SSE. > > That said, I just tried testing a 64-bit version of sympow I'd made before on > OpenSolaris on an Intel Xeon. In theory that should have worked, but it dumped > core. But nothing surprises me about SYMPOW. Any code that starts: > > #! /bin/sh > > then has code to test if the 'sh' shell exists or not, leaves a lot to be > desired. > > I dug out an old copy of the Intel 387 programmers reference manual I have, > and > looked at that last night so I understand what's going on more. I'll have a > patch soon, which will hopefully be portable across compilers and operating > systems. > > Dave -- 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