On 20 August 2010 21:09, Mike Hansen <mhan...@gmail.com> wrote: > This was from Michael Abshoff from awhile back when he was working on > Sage and Solaris: > > """ > * sympow: Here we are using Mark Watkins own quaddouble code and the > FPU mode setting code is basically busted. There are two ways how to > handle this: (a) Fix the FPU mode setting code by using Solaris > specific headers (b) rip out the quaddouble code and replace it with > MPFR. (a) might be less work in the short term, but (b) seems to be > the better long term solution since on Mips64 or Sparc for example > IEEE does act sufficiently different to cause trouble. At least the > examples we test on Sparc with sympow seem to compute correctly, but I > would not trust it at all until we use MPFR. > """ > > We had run into accuracy issues with Bailey's quaddouble in Sage on > Solaris when working on the number_of_partitions code. > > --Mike
Thanks Mike. I believe I now have a much better understanding of this, and why it affects only Cygwin and Solaris on 86. There is nothing to worry about with Solaris on SPARC. If one downloads the latest quad double package qd-2.3.11.tar.gz, there is a paper in the docs directory: "Library for Double-Double and Quad-Double Arithmetic∗ Yozo Hida† Xiaoye S. Li‡ David H. Bailey‡ May 8, 2008" In that it says: "Note on Intel x86 Processors. The algorithms in this library assume IEEE double precision floating point arithmetic. Since Intel x86 processors have extended (80-bit) floating point registers, the round-to-double flag must be enabled in the control word of the FPU for this library to function properly under x86 processors. The function fpu fix start turns on the round-to-double bit in the FPU control word, while fpu fix end will restore the original state." Both Solaris on x86 and Cygwin will *not* get this set with sympow, because it only attempts this if 1) The OS is Linux 2) The processor is x86. Neither Cygwin or Solaris x86 are consdiered to fall into this category by the Configure script. But on Solaris x86 at least, the QD package I downloaded builds and passes all tests. It uses a bit of inline assembly code to put thex FPU in the right mode. That should be pretty trivial I think. I should be able to create something that will work on both Solaris x86 and Cygwin. 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