So, apart from the fact that emacs is the only thing a computer should ever 
run, here is something that might be useful, related to #12589.  Of course, 
the three-liner below is just a proof of concept, but could easily be 
expanded into something that works reliably.

Martin

"""
sage: var('q')
sage: f=(q^13362120470/((q - 1)*(q^5 - 1)*(q^21 - 1)*(q^85 - 1)*(q^341 
-1)*(q^1365 - 1)*(q^5461 - 1)*(q^21845 - 1)*(q^87381 - 1)*(q^349525 
-1)*(q^1398101 - 1)*(q^5592405 - 1)*(q^22369621 - 1)*(q^89478485 
-1)*(q^357913941 - 1)*(q^1431655765 - 1)*(q^5726623061 - 1)) 
+1)/(q^7635497409/((q - 1)*(q^5 - 1)*(q^21 - 1)*(q^85 - 1)*(q^341 
-1)*(q^1365 - 1)*(q^5461 - 1)*(q^21845 - 1)*(q^87381 - 1)*(q^349525 
-1)*(q^1398101 - 1)*(q^5592405 - 1)*(q^22369621 - 1)*(q^89478485 
-1)*(q^357913941 - 1)*(q^1431655765 - 1)*(q^5726623061 - 1)) + 1)
sage: series(f, q, 0)
       11
1 + O(q  )

sage: series(sin(q), q, 0)
    1  3    1   5     1   7      1    9      11
q - - q  + --- q  - ---- q  + ------ q  + O(q  )
    6      120      5040      362880

"""
def series(expr, x, a):
    t = "UTS(FRAC INT, '" + str(x) + ", " + str(a) + ")"
    fricas.set(str(x), "monomial(1,1)$" + t)
    return fricas("(" + str(expr) + ")" + "::" + t)

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to