#10042: Doctest failure in sage/rings/polynomial/polynomial_element.pyx
-----------------------+----------------------------------------------------
   Reporter:  mpatel   |       Owner:  mvngu     
       Type:  defect   |      Status:  needs_work
   Priority:  blocker  |   Milestone:  sage-4.6  
  Component:  doctest  |    Keywords:            
     Author:           |    Upstream:  N/A       
   Reviewer:           |      Merged:            
Work_issues:           |  
-----------------------+----------------------------------------------------
Changes (by dimpase):

  * work_issues:  report upstream =>


Comment:

 Replying to [comment:67 mpatel]:
 > I'd still like to resolve this before we release 4.6.
 >
 > Are there any objections to Leif's suggestion to use tagged 32-bit and
 64-bit results?  Or, if tagging doesn't cover all reported cases, to using
 dots (`...`)?

 Well, do we agree now that this is a purely doctest problem? (mhansen
 (changeset 14950, trac #8054)
 has put too many digits there...)

 One cannot expect more precision from NumPy/Lapack than a concrete
 combination of hardware and software gives you.
 There is in fact a Lapack  call that will give you the precision, but this
 looks to me an overkill to code this into the doctest.
 On all the platforms we have, the precision of more than 2.22045E-16 is
 what we get.
 So the test should pass if the difference between the actual root and the
 NumPy output is less than that.
 Which amounts to putting dots after, umh, you do the maths :-)

 P.S. For the interested, this is how to test DGEEV without anything but a
 Fortran compiler (assuming Lapack is installed):

 1) grab http://www.nag.co.uk/lapack-ex/examples/source/dgeev-ex.f off the
 net

 2) edit it to increase the number of digits printed, i.e. edit format
 statements labelled 9999 and 9998 so that they look as follows:
 {{{
 99999 FORMAT (1X,A,I2,A,1P,E42.35)
 99998 FORMAT (1X,A,I2,A,'(',1P,E42.35,',',1P,E42.35,')')
 }}}

 3) compile it with your Fortran compiler:
 (something like $ gfortran -llapack dgeev-ex.f )

 4) create a text file, say, inp.txt, with the input (the data begins at
 the 2nd line):
 {{{
 # blah...
 2
 0. 0.3141592653589793115998000D+01
 1. 0.
 }}}

 5) $ ./a.out <inp.txt

 Eigenvalues of the 2x2 matrix in inp.txt, i.e. +/- square root of Pi, up
 to the precision the setup can manage, will be printed in all gory detail.

 Dima

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10042#comment:68>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to