Opened 3 years ago

Last modified 3 years ago

#22395 new defect

ordering of (O-)terms: absolute values, real parts, etc.

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-7.6
Component: asymptotic expansions Keywords:
Cc: cheuberg, behackl Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The following (although correct) is not ideal:

sage: A.<n> = AsymptoticRing('ZZ^n * n^ZZ', ZZ)
sage: (-1)^n/n + O((-1)^n/n^2) + n + O(1/n^3) + O(1/n^(2+I))
(-1)^n*n^(-1) + O((-1)^n*n^(-2)) + n + O(n^(-I - 2))

The O-Terms could/should be combined. The O-Term O((-1)^n*n^(-2)) should be O(n^-2) and O(n^(-I - 2)) should be O(n^-2).

The ordering is also not what one would expect, e.g.

sage: (-1)^n/n + O((-1)^n/n^2) + n^2 + O(1/n^3) + O(1/n^(2+I))
(-1)^n*n^(-1) + O((-1)^n*n^(-2)) + n^2 + O(n^(-I - 2))

and we would like to see the n^2 at the front.

Change History (3)

comment:1 in reply to: ↑ description Changed 3 years ago by dkrenn

Replying to dkrenn:

The ordering is also not what one would expect, e.g.

sage: (-1)^n/n + O((-1)^n/n^2) + n^2 + O(1/n^3) + O(1/n^(2+I))
(-1)^n*n^(-1) + O((-1)^n*n^(-2)) + n^2 + O(n^(-I - 2))

and we would like to see the n^2 at the front.

Here I am not sure, if this is the same problem as above; if not, then we can either forget about it or open a new ticket for it.

comment:2 Changed 3 years ago by dkrenn

  • Type changed from PLEASE CHANGE to defect

comment:3 Changed 3 years ago by dkrenn

Moreover, I am not sure, how to deal with these issues.

Note: See TracTickets for help on using tickets.