#14115: missing log attribute for power series
-------------------------------------------+--------------------------------
Reporter: chapoton | Owner: AlexGhitza
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.8
Component: algebra | Resolution:
Keywords: logarithm, power series | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------+--------------------------------
Changes (by chapoton):
* status: new => needs_review
Old description:
> Consider the following
>
> {{{
> sage: x=PowerSeriesRing(QQ,'x').gen()
> sage: x.exp()
> 1 + x + 1/2*x^2 + 1/6*x^3 + 1/24*x^4 + 1/120*x^5 + 1/720*x^6 + 1/5040*x^7
> + 1/40320*x^8 + 1/362880*x^9 + 1/3628800*x^10 + 1/39916800*x^11 +
> 1/479001600*x^12 + 1/6227020800*x^13 + 1/87178291200*x^14 +
> 1/1307674368000*x^15 + 1/20922789888000*x^16 + 1/355687428096000*x^17 +
> 1/6402373705728000*x^18 + 1/121645100408832000*x^19 + O(x^20)
> sage: x.log()
> AttributeError Traceback (most recent call
> last)
> ...
> AttributeError: 'sage.rings.power_series_poly.PowerSeries_poly' object
> has no attribute 'log'
> }}}
>
> I think it would be good to have log if one has exp, in order to be able
> to go back and forth. Of course, one should check that the constant term
> is 1.
New description:
Consider the following
{{{
sage: x=PowerSeriesRing(QQ,'x').gen()
sage: x.exp()
1 + x + 1/2*x^2 + 1/6*x^3 + 1/24*x^4 + 1/120*x^5 + 1/720*x^6 + 1/5040*x^7
+ 1/40320*x^8 + 1/362880*x^9 + 1/3628800*x^10 + 1/39916800*x^11 +
1/479001600*x^12 + 1/6227020800*x^13 + 1/87178291200*x^14 +
1/1307674368000*x^15 + 1/20922789888000*x^16 + 1/355687428096000*x^17 +
1/6402373705728000*x^18 + 1/121645100408832000*x^19 + O(x^20)
sage: x.log()
AttributeError Traceback (most recent call
last)
...
AttributeError: 'sage.rings.power_series_poly.PowerSeries_poly' object has
no attribute 'log'
}}}
I think it would be good to have log if one has exp, in order to be able
to go back and forth. Of course, one should check that the constant term
is 1.
Here is a patch that does the job.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14115#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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.