#16198: replace default algorithm for log(power series)
-------------------------------------------------+-------------------------
       Reporter:  rws                            |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.2
      Component:  calculus                       |   Resolution:
       Keywords:  log, function, series          |    Merged in:
  expansion                                      |    Reviewers:
        Authors:                                 |  Work issues:
Report Upstream:  N/A                            |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by kcrisman):

 I don't think Ginac is actually involved.  Take a look at the last piece
 of the traceback, which points to
 
[http://git.sagemath.org/sage.git/tree/src/sage/rings/power_series_ring_element.pyx#n1585
 here].  In particular, in sage/rings/power_series_ring_element.pyx,
 {{{

         if prec is None:
             prec = self._parent.default_prec()

         if not self[0].is_one():
             raise ArithmeticError("constant term of power series is not
 1")

         zero = self.parent().zero()
         t = zero.solve_linear_de(prec,b=self.derivative()/self,f0=0)
         return t

 }}}
 So this is actually hard-coded in for some reason, referring eventually to
 `_solve_linear_de` which was factored out of this stuff a very long time
 ago.

 It could be worth asking around why/whether this is really necessary.  I
 don't know that I want the above instead of
 {{{
 sage: log(2-x)
 log(-x + 2)
 sage: _.taylor(x,0,16)
 -1/1048576*x^16 - 1/491520*x^15 - 1/229376*x^14 - 1/106496*x^13 -
 1/49152*x^12 - 1/22528*x^11 - 1/10240*x^10 - 1/4608*x^9 - 1/2048*x^8 -
 1/896*x^7 - 1/384*x^6 - 1/160*x^5 - 1/64*x^4 - 1/24*x^3 - 1/8*x^2 - 1/2*x
 + log(2)
 }}}
 note the `log(2)` instead of an approximation.

--
Ticket URL: <http://trac.sagemath.org/ticket/16198#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to