#12195: numerical_approx broken for vectors
--------------------------------------------------------------+-------------
       Reporter:  robertwb                                    |         Owner:  
jason, was               
           Type:  defect                                      |        Status:  
needs_work               
       Priority:  major                                       |     Milestone:  
sage-5.1                 
      Component:  linear algebra                              |    Resolution:  
                         
       Keywords:  sd40.5                                      |   Work issues:  
                         
Report Upstream:  N/A                                         |     Reviewers:  
Rob Beezer, William Stein
        Authors:  Robert Bradshaw, Rob Beezer, William Stein  |     Merged in:  
                         
   Dependencies:                                              |      Stopgaps:  
                         
--------------------------------------------------------------+-------------
Changes (by {'newvalue': u'Robert Bradshaw, Rob Beezer, William Stein', 
'oldvalue': u'robertwb'}):

  * status:  positive_review => needs_work
  * author:  robertwb => Robert Bradshaw, Rob Beezer, William Stein


Old description:

> #1294 implemented {{{n()}}} but not {{{N()}}} or the functional
> {{{numerical_approx}}}

New description:

 #1294 implemented {{{n()}}} but not {{{N()}}} or the functional
 {{{numerical_approx}}}

 '''Apply:'''
   1.  [attachment:trac_12195-numerical-approx-v3.patch]

--

Comment:

 * Previous patches had the `_numerical_approx` function in the generic
 dense class, and specialized classes (such as rational dense) derive
 directly from the plain free module element class.  Thus the method was
 invisible to those specialized classes and only "generic" vectors could
 use this.  So I took William's version of the function and moved it up to
 a higher level.

  * Removed a pile of `n()` methods, but preserved many of their doctests
 in the new method.

  * Could not resist poking at the documentation of
 `misc.functional.numerical_approx`, so there was a drive-by upgrade there.

  * Improved the passing of `prec` and `digits` in one or two places.

  * Reworked the sparse case slightly and added a doctest to make sure it
 was not being clobbered.

  * Passes all tests.

  * Seemingly other places to look for removal, almost all outside my
 expertise.  Maybe I should put these on a new ticket for safekeeping?  The
 one for graphs is OK and does not need any inspection.
     {{{
 sage: search_src('def n\(')
 modular/abvar/morphism.py:801:    def n(self):
 modules/vector_mod2_dense.pyx:447:    def n(self, *args, **kwargs):
 interfaces/qsieve.py:176:    def n(self):
 schemes/elliptic_curves/heegner.py:4386:    def n(self):
 schemes/elliptic_curves/ell_curve_isogeny.py:3468:    def n(self):

 sage: search_src('def N\(')
 modular/modsym/p1list.pyx:1165:    def N(self):
 modular/modsym/p1list_nf.py:261:    def N(self):
 modular/modsym/p1list_nf.py:642:    def N(self):
 modular/quatalg/brandt.py:534:    def N(self):
 graphs/generic_graph_pyx.pyx:356:def N(n):

 sage: search_src('def numerical_approx\(')
 misc/functional.py:1196:def numerical_approx(x, prec=None, digits=None):
 schemes/elliptic_curves/heegner.py:3127:    def numerical_approx(self,
 prec=53):
 schemes/elliptic_curves/heegner.py:3979:    def numerical_approx(self,
 prec=53):

 sage: search_src('def _numerical_approx\(')
 matrix/matrix2.pyx:10332:    def
 _numerical_approx(self,prec=None,digits=None):
 modules/free_module_element.pyx:991:    def _numerical_approx(self,
 prec=None, digits=None):
 modules/free_module_element.pyx:4361:    def _numerical_approx(self,
 prec=None, digits=None):
 symbolic/expression.pyx:4053:    def _numerical_approx(self, prec=None,
 digits=None):
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12195#comment:7>
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