ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 19 Dec 2018 14:26:09 -0600How to import functions to program?http://ask.sagemath.org/question/44713/how-to-import-functions-to-program/Hello,
Sory for stupid question. Im new to sage and I would like to import a class/base that will allow me to use convergent() and numerator() functions. How could I do that?
I found class sage.rings.continued_fraction.ContinuedFraction_base
Bases: sage.structure.sage_object.SageObject
However when trying something like import, it doesn't work ..
trrrrrrWed, 19 Dec 2018 14:26:09 -0600http://ask.sagemath.org/question/44713/Simplify to real and positive numbershttp://ask.sagemath.org/question/9292/simplify-to-real-and-positive-numbers/ eng8 = [solve(eng==(k-1)*md*Vm1^2/(2*Patm*Vs*((Pc-(P2*s6))-(Pc-(P2*s6))^(1/k))),Vm1) for s6 in srange(r9,r10,s5,include_endpoint=1)]
v4=[v[0].rhs().n() for v in eng8]
v5=[v for v in v4 if v >= 0]
I can't seem to get v5 to output both real and positive numbers, only an empty list. All the inputs are positive, and I know the square root of the squared gives both positive and negative output. Any help?
duke11235Tue, 04 Sep 2012 08:24:34 -0500http://ask.sagemath.org/question/9292/