On 20 August 2010 05:03, Mike Hansen <mhan...@gmail.com> wrote: > On Thu, Aug 19, 2010 at 6:13 PM, Dr. David Kirkby > <david.kir...@onetel.net> wrote: >> Looking at sage-windows, there does not seem to be much activity on the >> Cygwin port. Is there anyone who is working on that now? Last I knew from >> William, none of the developers (mainly him and Mike) seemed to have time. > > All of the hard problems needed to get something out are done. It's > just cleaning up some easy stuff. All of the known issues are at > http://trac.sagemath.org/sage_trac/wiki/CygwinPort . For things which > cannot be solved, we can just throw a NotImplementedError on Cygwin. > I have a build going of 4.5.2 on one of the winxp virtual machines, > but things take forever to build. > >> 1) Build with debugging information on a platform where SYMPOW does work. >> 2) Build with debugging information on a platform where SYMPOW does not work >> 3) Single step, one line at a time, and try to see where the two systems >> differ. > > I've basically done this and the very first errors come from the QD.c > file. The QD_mul function seems to be broken on Cygwin, and from the > looks of it on Solaris x86.
Since all this file does is quad-double > precision arithmetic, one idea would be to convert it to use MPFR > which should not suffer from these problems. An advantage of this > would be that it wouldn't require a detailed knowledge of the > mathematics behind sympow. > > --Mike Thank you Mike. I looked at the SYMPOW code, and don't fancy myself trying to make a quad double -> mpfr transition myself. That does not look at easy task! However reading the sympow README file, one finds that: "The quad-double package was modified from David Bailey's package: crd.lbl.gov/~dhbailey/mpdist/" When I downloaded David Bailey's QD package from that web site, it is *much* better written than the QD.c in SYMPOW * It uses the standard maths libraries, rather than have it own code to put sin, cos, log, exp, pow etc. * It uses autoconf/automake * Written in C++, rather than a GNU variant of the C programming language. * Builds with both the GNU and Sun compilers. * Has a test suite, which passes all of the tests whether I use the GNU or the Sun compilers I wonder if the problem occurred in the conversion of David Bailey's package's quad-double package to that in SYMPOW I believe at one point quad double was in Sage and removed. I'm not saying how good/bad QD is, but the source code looks a lot better than the converted version in SYMPOW. I don't know if this would work, but one possibility to fix SYMPOW might be to 1) Add David Baily's QD source code to the sympow package - I doubt anyone would want QD as a standard Sage package. 2) Build the QD library libqd.a 3) Remove SYMPOW's QD.c file. 4) Link sympow against the unmodified QD source code, rather than a badly converted version. (Do that on at least platforms where SYMPOW will not work, leaving it unchanged on platforms where SYMPOW works ok). That asssumes the API is largely unchanged. Dave === Test results of QD on OpenSolaris - the same machine where SYMPOW fails miserably === Testing dd_real ... Test 1. (Polynomial). Test passed. Test 2. (Machin's Formula for Pi). Test passed. Test 3. (Salamin-Brent Quadratic Formula for Pi). Test passed. Test 4. (Borwein Quartic Formula for Pi). Test passed. Test 5. (Taylor Series Formula for E). Test passed. Test 6. (Taylor Series Formula for Log 2). Test passed. Test 7. (Sanity check for exp). Test passed. Test 8. (Sanity check for sin / cos). Test passed. Testing qd_real ... Test 1. (Polynomial). Test passed. Test 2. (Machin's Formula for Pi). Test passed. Test 3. (Salamin-Brent Quadratic Formula for Pi). Test passed. Test 4. (Borwein Quartic Formula for Pi). Test passed. Test 5. (Taylor Series Formula for E). Test passed. Test 6. (Taylor Series Formula for Log 2). Test passed. Test 7. (Sanity check for exp). Test passed. Test 8. (Sanity check for sin / cos). Test passed. PASS: qd_test Performing double-double precision PSLQ. testing pslq_test(2, 2) ... elapsed time = 5.895e-05 seconds. test passed. testing pslq_test(2, 3) ... elapsed time = 0.0004945 seconds. test passed. testing pslq_test(2, 4) ... elapsed time = 0.001477 seconds. test passed. testing pslq_test(3, 3) ... elapsed time = 0.003091 seconds. test passed. testing pslq_test(2, 5) ... elapsed time = 0.004242 seconds. test passed. Performing quad-double precision PSLQ. testing pslq_test(3, 3) ... elapsed time = 0.03036 seconds. test passed. testing pslq_test(2, 5) ... elapsed time = 0.004235 seconds. test passed. testing pslq_test(4, 3) ... elapsed time = 0.1302 seconds. test passed. testing pslq_test(2, 6) ... elapsed time = 0.1215 seconds. test passed. testing pslq_test(2, 7) ... elapsed time = 0.2665 seconds. test passed. testing pslq_test(3, 5) ... elapsed time = 0.4064 seconds. test passed. All tests passed. PASS: pslq_test Test 1. (Salamin-Brent quadratically convergent formula for pi) iteration 0: 4.00000000000000000000000000000000000000000000000000000000000000e+00 iteration 1: 3.18767264271210862720192997052536923265105357185936922648763399e+00 iteration 2: 3.14168029329765329391807042456000938279571943881540283264418946e+00 iteration 3: 3.14159265389544649600291475881804348610887923726131158965110136e+00 iteration 4: 3.14159265358979323846636060270663132175770241134242935648684602e+00 iteration 5: 3.14159265358979323846264338327950288419716994916472660583469612e+00 iteration 6: 3.14159265358979323846264338327950288419716939937510582097494458e+00 _pi: 3.14159265358979323846264338327950288419716939937510582097494459e+00 error: 8.20417e-63 = 6.75 eps PASS: c_test 3.14159265358979323846264338327950288419716939937510582097494459E+00 1.00000000000000000000000000000000000000000000000000000000000000E+00 7.85398163397448309615660845819875721049292349843776455243736148E-01 2.00000000000000000000000000000000000000000000000000000000000000E+00 1.10714871779409050301706546017853704007004764540143264667653921E+00 3.00000000000000000000000000000000000000000000000000000000000000E+00 1.24904577239825442582991707728109012307782940412989671905466924E+00 NAN 3.00000000000000000000000000000000000000000000000000000000000000E+00 1.24904577239825442582991707728109012307782940412989671905466924E+00 PASS: f_test ================== All 4 tests passed ================== make[3]: Leaving directory `/export/home/drkirkby/qd-2.3.11/tests' make[2]: Leaving directory `/export/home/drkirkby/qd-2.3.11/tests' Making check in fortran make[2]: Entering directory `/export/home/drkirkby/qd-2.3.11/fortran' make[2]: warning: -jN forced in submake: disabling jobserver mode. make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/export/home/drkirkby/qd-2.3.11/fortran' make[2]: Entering directory `/export/home/drkirkby/qd-2.3.11' make[2]: warning: -jN forced in submake: disabling jobserver mode. make[2]: Leaving directory `/export/home/drkirkby/qd-2.3.11' make[1]: Leaving directory `/export/home/drkirkby/qd-2.3.11' -- 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