Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Try :

sage: a = 3*x^2 + 2*x + 1
sage: b = 5*x^3 - 2*x^2 + 3
sage: c=[(a/b).subs(x==u).n() for u in range(100, 30001, 100)]

What you tried is roughly :

sage: d=[(a/b)(u).n() for u in range(100, 30001, 100)]
<ipython-input-28-1031e54150fe>:1: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...)
See http://trac.sagemath.org/5930 for details.

You can do :

sage: d=[(a/b)(x=u).n() for u in range(100, 30001, 100)]

successfully...